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

mexico-holidays

v1.0.0

Published

Federal Labor Law Article 74 holidays and business-day helpers for Mexico.

Readme

mexico-holidays

Rule-based federal mandatory-rest days for Mexico under Article 74 of the Federal Labor Law.

This package calculates movable holidays instead of maintaining a list of dates for every year.

Install

npm install mexico-holidays

API

import {
  getHolidays,
  isHoliday,
  isBusinessDay
} from "mexico-holidays";

getHolidays(2027);
// [
//   {
//     date: "2027-01-01",
//     name: "New Year's Day",
//     nameEs: "Año Nuevo",
//     legalReference: "Article 74(I)"
//   },
//   ...
// ]

isHoliday("2027-02-01"); // true
isBusinessDay("2027-02-01"); // false
isBusinessDay("2027-02-02"); // true
isBusinessDay("2027-02-06", { weekendDays: ["saturday"] }); // false
isBusinessDay("2027-02-07", { weekendDays: ["saturday"] }); // true

// Include the customary Holy Week closures in addition to federal holidays.
getHolidays(2027, { includeHolyWeek: true });
isHoliday("2027-03-26", { includeHolyWeek: true }); // Good Friday
isBusinessDay("2027-03-26", { includeHolyWeek: true }); // false

The functions accept either a YYYY-MM-DD string or a JavaScript Date. Date-only strings are interpreted as calendar dates. Date values are converted using America/Mexico_City. All three functions accept the same optional second argument. Set includeHolyWeek: true to include Good Friday and Holy Saturday in holiday calculations. The weekendDays option affects only isBusinessDay, because weekends are not holiday records returned by getHolidays or isHoliday. By default, Saturdays and Sundays are not business days. Pass a weekendDays array to isBusinessDay to customize this: use ["saturday"] for Saturdays only, ["sunday"] for Sundays only, or ["saturday", "sunday"] for both. An empty array makes both days business days. Federal holidays still take precedence.

Included holidays

  • January 1
  • First Monday of February
  • Third Monday of March
  • May 1
  • September 16
  • Third Monday of November
  • October 1 every six years when the Federal Executive Power is transferred
  • December 25

Article 74(IX) also refers to ordinary election days. Those dates depend on the applicable federal or local electoral law and election cycle, so they are not invented by this package. Add them in your application when the competent electoral authority publishes them.

Holy Week is not a federal mandatory-rest period under Article 74. Pass { includeHolyWeek: true } to getHolidays, isHoliday, or isBusinessDay when your organization observes the customary closures on Good Friday and Holy Saturday. The option is disabled by default and the dates are calculated from Gregorian Easter.

This package does not include company closures, school holidays, banking calendars, vacations, or state-specific holidays.

CommonJS

const {
  getHolidays,
  isHoliday,
  isBusinessDay
} = require("mexico-holidays");

Development

npm test
npm pack --dry-run

License

MIT