Simple library to get Czech name days (jmeniny
, svátek
) for a given date.
You can import the whole module or just specific functions:
import * as namedays from 'namedays-cs';
import {getNameDay} from 'namedays-cs';
You can get name days for a given date:
import {getNameDay} from 'namedays-cs';
const date = new Date(2024, 11, 24); // 24. december 2024
// Get name days for a given date
getNameDay(date); // ['Adam', 'Eva']
getNameDay(date).join(' a '); // Adam a Eva
It is possible that there are no name days for a given date:
import {getNameDay} from 'namedays-cs';
const date = new Date(2024, 11, 25); // 25. december 2024
getNameDay(date); // [] (empty array)