Public holidays for 20+ countries

Import

import { ... } from 'ts-time-utils/holidays';

Examples

International Holidays

Get public holidays for any supported country

import { getHolidays, isHoliday, getNextHoliday } from 'ts-time-utils/holidays';

// Get all UK bank holidays for 2025
const ukHolidays = getHolidays(2025, 'UK');
ukHolidays.forEach(h => {
  console.log(`${h.name}: ${h.date.toDateString()}`);
});

// German holidays
const deHolidays = getHolidays(2025, 'DE');
console.log(`Germany has ${deHolidays.length} public holidays`);

// Check if a date is a holiday
const christmas = new Date('2025-12-25');
console.log('Is Christmas a US holiday?', isHoliday(christmas, 'US'));
console.log('Is Christmas a JP holiday?', isHoliday(christmas, 'JP'));

// Get the next holiday from today
const nextCA = getNextHoliday(new Date(), 'CA');
console.log('Next Canadian holiday:', nextCA?.name);

// Supported countries:
// UK, NL, DE, CA, AU, IT, ES, CN, IN, US,
// JP, FR, BR, MX, KR, SG, PL, SE, BE, CH