Skip to content

itw-creative-works/holiday-butler

Repository files navigation




Site | NPM Module | GitHub Repo

holiday-butler is the official npm module of Holiday Butler, a free app for getting the dates of holidays for any year in any country.

🌐 Holiday Butler Works in Node AND browser environments

Yes, this module works in both Node and browser environments, including compatibility with Webpack and Browserify!

🦄 Features

  • Get all holidays for any year
  • Works in any country

🔑 Getting an API key

You can use so much of holiday-butler for free, but if you want to do some advanced stuff, you'll need an API key. You can get one by signing up for a Holiday Butler account.

📦 Install Holiday Butler

Use the API

fetch('https://cdn.jsdelivr.net/npm/holiday-butler@latest/dist/holiday/US/2050.json')
.then(res => {
  if (res.status >= 200 && res.status < 300) {
    res.json()
    .then(function (holidays) {
      console.log('Holidays', holidays)
    })
  }
})