npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

brazil-holiday-calendar

v1.1.1

Published

A Node.js package to get all Brazilian holidays, including national, movable, and custom holidays. It also provides useful utilities like checking business days, calculating working days between dates, and adding custom holidays.

Downloads

13

Readme

🎉 Brazilian Holidays / Feriados Brasileiros 📅

🚀 A powerful and flexible Node.js package to handle Brazilian holidays with ease. 🚀 Um pacote Node.js poderoso e flexível para lidar com feriados brasileiros de forma simples.

GitHub License npm Node.js

📦 Installation / Instalação

npm install brazil-holiday-calendar

🚀 Features / Funcionalidades

  • National Holidays (fixed and movable) / Feriados Nacionais (fixos e móveis)
  • 🌍 State Holidays (organized by states) / Feriados Estaduais (organizados por estados)
  • 🏙️ Municipal Holidays (nested within states) / Feriados Municipais (aninhados aos estados)
  • 🔍 Check Business Days / Verificar Dias Úteis
  • 📊 Count Working Days between two dates / Contar Dias Úteis entre duas datas
  • ✏️ Add or Update Custom Holidays dynamically / Adicionar ou Atualizar Feriados Personalizados dinamicamente
  • ⏭️ Find the Next Holiday / Encontrar o Próximo Feriado

🗓️ Usage / Uso

const { 
  getHolidays, 
  isBusinessDay, 
  getNextHoliday, 
  countBusinessDays, 
  addCustomHoliday 
} = require('brazil-holiday-calendar');

// 📅 Get all holidays for a specific year / Obter todos os feriados para um ano específico
console.log(getHolidays(2024));

// 🚫 Check if a date is a business day / Verificar se uma data é um dia útil
console.log(isBusinessDay('2024-12-25')); // false (Natal)

// ⏭️ Get the next upcoming holiday / Obter o próximo feriado
console.log(getNextHoliday('2024-04-15'));

// 📊 Count business days between two dates / Contar dias úteis entre duas datas
console.log(countBusinessDays('2024-01-01', '2024-12-31'));

// ✏️ Add or update a custom holiday / Adicionar ou atualizar um feriado personalizado
addCustomHoliday({ date: '2024-11-20', name: 'Consciência Negra', state: 'SP', city: 'São Paulo' });
console.log(getHolidays(2024, 'SP', 'São Paulo'));

⚡ API Reference / Referência da API

getHolidays(year, state, city)

Returns an array of holidays for the specified year, state, and city. Retorna um array de feriados para o ano, estado e cidade especificados.

isBusinessDay(date, state, city)

Checks if the provided date is a business day, considering national, state, and municipal holidays. Verifica se a data fornecida é um dia útil, considerando feriados nacionais, estaduais e municipais.

getNextHoliday(date, state, city)

Returns the next holiday after the given date. Retorna o próximo feriado após a data fornecida.

countBusinessDays(startDate, endDate, state, city)

Counts the number of business days between two dates. Conta o número de dias úteis entre duas datas.

addCustomHoliday({ date, name, state, city })

Adds or updates a custom holiday for a specific state or city. Adiciona ou atualiza um feriado personalizado para um estado ou cidade específico.

📜 License / Licença

This project is licensed under the MIT License. Feel free to use, modify, and distribute it. Este projeto está licenciado sob a Licença MIT. Sinta-se à vontade para usar, modificar e distribuir.

Designed and developed with ❤️ by Thiago Dias, an enthusiast of technology 🚀 / Projetado e desenvolvido com ❤️ por Thiago Dias, um entusiasta da tecnologia 🚀