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

colombian-holidays

v7.1.2

Published

Colombian holidays

Downloads

14,795

Readme

Colombian Holidays

npm version

TypeScript module to work with Colombian holidays.

Installation

npm install colombian-holidays

Usage

Import each helper from its dedicated subpath (ESM only):

import { FIRST_HOLIDAY_YEAR, LAST_HOLIDAY_YEAR } from "colombian-holidays/constants";
import { getHolidaysByYear } from "colombian-holidays/getHolidaysByYear";
import { getHoliday } from "colombian-holidays/getHoliday";
import { isHoliday } from "colombian-holidays/isHoliday";
import { holidaysWithinInterval } from "colombian-holidays/holidaysWithinInterval";

The supported year range is from FIRST_HOLIDAY_YEAR to LAST_HOLIDAY_YEAR.

console.log(FIRST_HOLIDAY_YEAR); // 1583
console.log(LAST_HOLIDAY_YEAR); // 4099

All date comparisons are done in UTC.

Public API

getHolidaysByYear

Returns all Colombian holidays for a given year.

import { getHolidaysByYear } from "colombian-holidays/getHolidaysByYear";

const holidays = getHolidaysByYear(2025);

Throws when the year is out of range:

getHolidaysByYear(1582);
// Error: The year should be between 1583 and 4099

Return native Date values instead of ISO strings:

const holidaysAsDates = getHolidaysByYear(2025, { valueAsDate: true });

Example output shape (valueAsDate: false, default):

[
  {
    date: "2025-01-01",
    celebrationDate: "2025-01-01",
    name: { es: "Año Nuevo", en: "New Year's Day" },
    nextMonday: false,
  },
  {
    date: "2025-01-06",
    celebrationDate: "2025-01-13",
    name: { es: "Reyes Magos", en: "Epiphany" },
    nextMonday: true,
  },
];

nextMonday indicates whether the holiday is effectively moved to Monday in that year. For years before 1984, moved holidays are not shifted.

If you need a specific month, filter by celebrationDate:

const januaryHolidays = getHolidaysByYear(2025).filter((holiday) => {
  return Number(holiday.celebrationDate.slice(5, 7)) === 1;
});

[!TIP] getHolidaysByYear uses an in-memory cache and is also used internally by the other helpers.

isHoliday

Returns true if a date is a Colombian holiday, otherwise false.

import { isHoliday } from "colombian-holidays/isHoliday";

const date = new Date("2018-01-01");

if (isHoliday(date)) {
  console.log("it is a colombian holiday");
} else {
  console.log("it is NOT a colombian holiday");
}

isHoliday checks the holiday celebration date (not always the original holiday date).

getHoliday

Returns the holiday object for a given date, or null when there is no match.

import { getHoliday } from "colombian-holidays/getHoliday";

const date = new Date("2018-01-01");
const holiday = getHoliday(date);

/*
  {
    celebrationDate: "2018-01-01",
    date: "2018-01-01",
    name: { en: "New Year's Day", es: "Año Nuevo" },
    nextMonday: false,
  }
*/

Returns null if the date is not a holiday.

Return native Date values:

const holidayAsDate = getHoliday(date, { valueAsDate: true });

holidaysWithinInterval

Returns holidays within an interval (inclusive bounds).

import { holidaysWithinInterval } from "colombian-holidays/holidaysWithinInterval";

const start = new Date("2021-01-01");
const end = new Date("2021-01-11");
const holidays = holidaysWithinInterval({ start, end });
// const holidays = holidaysWithinInterval({ start, end, valueAsDate: true });

Throws when start is equal to or greater than end:

holidaysWithinInterval({
  start: new Date("2022-01-01"),
  end: new Date("2022-01-01"),
});
// Error: end date should be greater than start date

Returns:

[
  {
    celebrationDate: "2021-01-01",
    date: "2021-01-01",
    name: { es: "Año Nuevo", en: "New Year's Day" },
    nextMonday: false,
  },
  {
    celebrationDate: "2021-01-11",
    date: "2021-01-06",
    name: { es: "Reyes Magos", en: "Epiphany" },
    nextMonday: true,
  },
];

Breaking change

As of this major version, the package no longer exports helpers from the root path. Use subpath imports instead.

Before:

import { getHolidaysByYear } from "colombian-holidays";

Now:

import { getHolidaysByYear } from "colombian-holidays/getHolidaysByYear";

The package is ESM-only.

ESM:

import { getHolidaysByYear } from "colombian-holidays/getHolidaysByYear";

CommonJS is not exported:

require("colombian-holidays/getHolidaysByYear");

Builds are generated with tsup and published as ESM.

TypeScript

The package is written in TypeScript and includes type definitions.

License

FOSSA Status