ita-holidays
simple tool to retrieve italian holidays
only italian language available (english language coming soon)
only from 2019 to 2023 (for now)
some things are hardcoded af but this is a 10 minutes project, improvements are on their way
usage:
npm install italian-holidays
and in your .js file:
const itaHolidays = require("italian-holidays");
or, for example, if you use it inside an angular app:
import * as itaHolidays from 'italian-holidays'
console.log(ita-holidays.getHolidays(2019, 'it'));
this will get an object like this:
{
id: 1,
day: '01/01/2019',
weekDay: 'martedì',
name: 'capodanno'
}
console.log(ita-holidays.getHolidaysOnlyDays(2019));
year is optional
this will get an array of dates formatted like this: DD/MM/YYYY
if year is omitted, the array will include dates from current year to 2023