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

indian-festivals

v1.0.1

Published

A comprehensive TypeScript database of Indian festivals including Hindu, Islamic, Christian, Sikh, Jain, Buddhist, National, and Tribal festivals by Kuntal Ojha.

Downloads

342

Readme

indian-festivals 🪔

npm License Downloads TypeScript

A comprehensive TypeScript database of Indian festivals — covering Hindu, Islamic, Christian, Sikh, Jain, Buddhist, National, and Tribal festivals with 35+ utility functions for filtering, searching, and date-based lookups.

Created by @kuntalojha as part of the India Data Ecosystem — a suite of npm packages for developers building India-focused applications.

indian-festivals banner


🪔 Overview

The indian-festivals package provides a structured, developer-friendly database of 80+ Indian festivals with rich metadata — dates from 2025 to 2030, geographic coverage by state, calendar information (Hindu & Islamic), customs, foods, rituals, and much more.

Whether you're building a tourism platform, a travel planner, a cultural app, or just need Indian festival data — this package has you covered.


📦 Installation

npm install indian-festivals

| Package Manager | Command | |-----------------|--------------------------------| | npm | npm install indian-festivals | | Yarn | yarn add indian-festivals | | PNPM | pnpm add indian-festivals | | BUN | bun add indian-festivals |


✨ Features

| Feature | Description | |---------|-------------| | 📅 70+ Festivals | Comprehensive data across 8 categories | | 🕉️ Multi-Religious | Hindu, Islamic, Christian, Sikh, Buddhist, Jain, Tribal & National | | 📖 Rich Information | Description, history, significance, customs & traditional foods | | 📆 Verified Dates | Year-wise dates from 2025 to 2030 | | 🆔 FID System | Universal Festival ID — FIDH05, supports bulk lookup | | 🗓️ Hindu Calendar | Tithi, Paksha, and Month information | | 🌙 Islamic Calendar | Day and Month in Islamic calendar | | 🔍 Powerful Search | Search with relevance score — ranked results | | 📦 TypeScript | Full type definitions included | | ⚡ Dual Module | ESM & CommonJS support | | 🪶 Zero Dependencies | Lightweight with no external dependencies |


🆔 Festival Reference — Code, FID & Name

Every festival has two identifiers:

| Identifier | Format | Example | Usage | |------------|----------|----------|------------------------------| | Code | H05 | H05 | Internal short reference | | FID | FIDx00 | FIDH05 | Public universal reference |

FID = FID prefix + Code. So FIDH05 → strips FIDH05 → Diwali. FID is case-insensitive: FIDH05, fidh05, FidH05 all work. FIDH05 is recommended.


🕉️ Hindu Festivals

| Code | Festival | FID | Public Holiday | |------|---------------------|---------|----------------| | H01 | Akshaya Tritiya | FIDH01 | ❌ | | H02 | Bhai Dooj | FIDH02 | ❌ | | H03 | Chhath Puja | FIDH03 | ❌ | | H04 | Dhanteras | FIDH04 | ❌ | | H05 | Diwali | FIDH05 | ✅ | | H06 | Durga Puja | FIDH06 | ✅ | | H07 | Dussehra | FIDH07 | ✅ | | H08 | Ganesh Chaturthi | FIDH08 | ✅ | | H09 | Govardhan Puja | FIDH09 | ❌ | | H10 | Gudi Padwa | FIDH10 | ❌ | | H11 | Hanuman Jayanti | FIDH11 | ✅ | | H12 | Holi | FIDH12 | ✅ | | H13 | Janmashtami | FIDH13 | ✅ | | H14 | Kali Puja | FIDH14 | ❌ | | H15 | Karwa Chauth | FIDH15 | ❌ | | H16 | Maha Shivaratri | FIDH16 | ✅ | | H17 | Makar Sankranti | FIDH17 | ✅ | | H18 | Nag Panchami | FIDH18 | ❌ | | H19 | Navratri | FIDH19 | ❌ | | H20 | Onam | FIDH20 | ✅ | | H21 | Poila Boishakh | FIDH21 | ❌ | | H22 | Pongal | FIDH22 | ✅ | | H23 | Raksha Bandhan | FIDH23 | ✅ | | H24 | Rama Navami | FIDH24 | ✅ | | H25 | Rath Yatra | FIDH25 | ❌ | | H26 | Saraswati Puja | FIDH26 | ❌ | | H27 | Teej | FIDH27 | ❌ | | H28 | Vasant Panchami | FIDH28 | ❌ |


☪️ Islamic Festivals

| Code | Festival | FID | Public Holiday | |------|---------------|---------|----------------| | M01 | Eid ul Adha | FIDM01 | ✅ | | M02 | Eid ul Fitr | FIDM02 | ✅ | | M03 | Milad un Nabi | FIDM03 | ✅ | | M04 | Muharram | FIDM04 | ✅ | | M05 | Shab-e-Barat | FIDM05 | ❌ |


✝️ Christian Festivals

| Code | Festival | FID | Public Holiday | |------|--------------------------|---------|----------------| | C01 | All Saints Day | FIDC01 | ❌ | | C02 | Christmas | FIDC02 | ✅ | | C03 | Easter | FIDC03 | ❌ | | C04 | Good Friday | FIDC04 | ✅ | | C05 | St. Francis Xavier Feast | FIDC05 | ❌ |


🪯 Sikh Festivals

| Code | Festival | FID | Public Holiday | |------|---------------------------|---------|----------------| | S01 | Baisakhi | FIDS01 | ✅ | | S02 | Bandi Chhor Divas | FIDS02 | ❌ | | S03 | Guru Gobind Singh Jayanti | FIDS03 | ✅ | | S04 | Guru Nanak Jayanti | FIDS04 | ✅ | | S05 | Hola Mohalla | FIDS05 | ❌ | | S06 | Lohri | FIDS06 | ❌ |


🔱 Jain Festivals

| Code | Festival | FID | Public Holiday | |------|----------------------|---------|----------------| | J01 | Jain Akshaya Tritiya | FIDJ01 | ❌ | | J02 | Jain Diwali | FIDJ02 | ❌ | | J03 | Mahavir Jayanti | FIDJ03 | ✅ | | J04 | Paryushana | FIDJ04 | ❌ | | J05 | Samvatsari | FIDJ05 | ❌ |


☸️ Buddhist Festivals

| Code | Festival | FID | Public Holiday | |------|----------------------------|---------|----------------| | B01 | Buddha Purnima | FIDB01 | ✅ | | B02 | Dhammachakra Pravartan Din | FIDB02 | ❌ | | B03 | Hemis Festival | FIDB03 | ❌ | | B04 | Losar | FIDB04 | ❌ |


🇮🇳 National Festivals & Holidays

| Code | Festival | FID | Public Holiday | |------|---------------------------|---------|----------------| | N01 | Ambedkar Jayanti | FIDN01 | ✅ | | N02 | Children's Day | FIDN02 | ❌ | | N03 | Constitution Day | FIDN03 | ❌ | | N04 | Gandhi Jayanti | FIDN04 | ✅ | | N05 | Independence Day | FIDN05 | ✅ | | N06 | International Day of Yoga | FIDN06 | ❌ | | N07 | National Unity Day | FIDN07 | ❌ | | N08 | National Youth Day | FIDN08 | ❌ | | N09 | Republic Day | FIDN09 | ✅ | | N10 | Teachers' Day | FIDN10 | ❌ |


🌿 Tribal Festivals

| Code | Festival | FID | Public Holiday | |------|-------------------|---------|----------------| | T01 | Ambubachi Mela | FIDT01 | ❌ | | T02 | Bihu | FIDT02 | ✅ | | T03 | Hornbill Festival | FIDT03 | ❌ | | T04 | Karam Festival | FIDT04 | ❌ | | T05 | Me-Dam-Me-Phi | FIDT05 | ❌ | | T06 | Sarhul | FIDT06 | ❌ | | T07 | Wangala | FIDT07 | ❌ |

Note: FID is case-insensitive. FIDH05, fidh05, and FidH05 all work — but FIDH05 is the recommended format.


📥 Importing

CommonJS (Node.js)

const { getFestivalByFID, getUpcomingFestivals } = require('indian-festivals');

ES Modules

import { getFestivalByFID, getUpcomingFestivals } from 'indian-festivals';

TypeScript

import { getFestivalByFID, Festival } from 'indian-festivals';

🔑 API Reference

🗺️ Festival Maps

| Export | Type | Description | |--------|------|-------------| | festivalsById | Map<string, Festival> | Fast O(1) lookup by festival id | | festivalsByReligion | Record<string, Festival[]> | All festivals grouped by religion |

import { festivalsById, festivalsByReligion } from 'indian-festivals';

// O(1) fast lookup
const diwali = festivalsById.get("diwali");

// All Hindu festivals grouped
const hindu = festivalsByReligion["Hindu"];

🔍 Festival Lookup

| Function | Returns | Description | |----------|---------|-------------| | getFestivalBySlug(slug) | Festival \| undefined | Get by slug | | getFestivalByName(name) | Festival \| undefined | Get by name or alternate name | | getFestivalByCode(code) | Festival \| undefined | Get by internal code e.g. H05 | | getFestivalByFestivalCode(code) | Festival \| undefined | Get by festival code e.g. DIWALI | | festivalExists(slug) | boolean | Check if a festival exists |

import { getFestivalBySlug, getFestivalByName, getFestivalByCode, festivalExists } from 'indian-festivals';

// By slug
const diwali = getFestivalBySlug("diwali");
console.log(diwali?.name);         // "Diwali"
console.log(diwali?.dates[2025]);  // "2025-10-20"
console.log(diwali?.religion);     // "Hindu"
console.log(diwali?.durationDays); // 5

// By name or alternate name
getFestivalByName("Deepavali");           // finds Diwali
getFestivalByName("Festival of Lights"); // also finds Diwali

// By internal code
getFestivalByCode("H05");  // Diwali
getFestivalByCode("N09");  // Republic Day

// Check existence
festivalExists("holi");   // true
festivalExists("xyz");    // false

🆔 FID Utilities

| Function | Returns | Description | |----------|---------|-------------| | getFestivalByFID(fid) | Festival \| undefined | Get single festival by FID | | getFestivalsByFIDs(fids) | Festival[] | Get multiple festivals by FID array |

import { getFestivalByFID, getFestivalsByFIDs } from 'indian-festivals';

// Single FID lookup
const diwali = getFestivalByFID("FIDH05");
console.log(diwali?.name);         // "Diwali"
console.log(diwali?.dates[2025]);  // "2025-10-20"

// FID is case-insensitive
getFestivalByFID("FIDH05"); // ✅ recommended
getFestivalByFID("fidh05"); // ✅ works
getFestivalByFID("FidH05"); // ✅ works

// Multiple FIDs — perfect for travel itineraries!
const festivals = getFestivalsByFIDs(["FIDH05", "FIDH12", "FIDS01", "FIDN05"]);
festivals.forEach(f => console.log(`${f.name} → ${f.dates[2025]}`));
// Diwali        → 2025-10-20
// Holi          → 2025-03-14
// Baisakhi      → 2025-04-13
// Independence Day → 2025-08-15

🕉️ Religion-based Utilities

| Function | Returns | Description | |----------|---------|-------------| | getFestivalsByReligion(religion) | Festival[] | All festivals of a religion | | getFestivalsByReligions(religions) | Festival[] | Festivals of multiple religions | | getFestivalCountByReligion() | Record<string, number> | Count grouped by religion | | getAvailableReligions() | string[] | All unique religions in dataset | | getPublicHolidays() | Festival[] | All public holidays | | getRestrictedHolidays() | Festival[] | All restricted holidays |

import { getFestivalsByReligion, getFestivalsByReligions, getFestivalCountByReligion, getAvailableReligions, getPublicHolidays } from 'indian-festivals';

// Single religion
const hinduFests = getFestivalsByReligion("Hindu");
console.log(hinduFests.length); // 28

// Multiple religions
const sikhAndJain = getFestivalsByReligions(["Sikh", "Jain"]);

// Count by religion
const counts = getFestivalCountByReligion();
console.log(counts);
// {
//   Hindu: 28, Islamic: 5, Christian: 5,
//   Sikh: 6, Jain: 5, Buddhist: 4,
//   National: 10, Tribal: 7
// }

// Available religions
getAvailableReligions();
// ["Buddhist", "Christian", "Hindu", "Islamic", "Jain", "National", "Sikh", "Tribal"]

// Public holidays only
const holidays = getPublicHolidays();
console.log(holidays.length); // 24

📅 Month & Date Utilities

| Function | Returns | Description | |----------|---------|-------------| | getFestivalsByMonth(month, year) | Festival[] | Festivals in a specific month and year | | getFestivalsByMonthAllYears(month) | Festival[] | Festivals in a month across all years | | getFestivalsInDateRange(start, end, year) | Festival[] | Festivals within a date range | | getFestivalsOnDate(date) | Festival[] | Festivals on a specific date | | getFullFestivalsByMonth(month, year) | { festival, date }[] | Festivals with dates, sorted | | getAvailableYears() | number[] | All years with festival data | | monthNames | string[] | Array of month names (constant) |

import { getFestivalsByMonth, getFestivalsOnDate, getFestivalsInDateRange, getFullFestivalsByMonth, getAvailableYears, monthNames } from 'indian-festivals';

// Festivals in October 2025
const oct = getFestivalsByMonth(10, 2025);
console.log(`${monthNames[9]} has ${oct.length} festivals`); // "October has 5 festivals"

// Festivals on a specific date
const onDiwali = getFestivalsOnDate("2025-10-20");
onDiwali.forEach(f => console.log(f.name)); // "Diwali"

// Festivals in a date range
const festiveSeaon = getFestivalsInDateRange("2025-10-01", "2025-11-30", 2025);
festiveSeaon.forEach(f => console.log(`${f.name} → ${f.dates[2025]}`));
// Dussehra       → 2025-10-02
// Dhanteras      → 2025-10-18
// Diwali         → 2025-10-20
// Govardhan Puja → 2025-10-21
// Bhai Dooj      → 2025-10-23

// Full festival objects with sorted dates
const full = getFullFestivalsByMonth(10, 2025);
full.forEach(({ festival, date }) => console.log(`${date}: ${festival.name}`));

// Available years
getAvailableYears(); // [2025, 2026, 2027, 2028, 2029, 2030]

⏰ Upcoming Festival Utilities

| Function | Returns | Description | |----------|---------|-------------| | getUpcomingFestivals(limit?) | { festival, date, daysUntil }[] | Next N upcoming festivals (default: 10) | | getNextFestival() | { festival, date, daysUntil } \| undefined | The very next festival | | getTodaysFestivals() | Festival[] | Festivals happening today | | getThisWeeksFestivals() | { festival, date, daysUntil }[] | Festivals in next 7 days | | getThisMonthsFestivals() | Festival[] | Festivals this month |

import { getUpcomingFestivals, getNextFestival, getTodaysFestivals, getThisWeeksFestivals } from 'indian-festivals';

// Next 5 upcoming festivals
const upcoming = getUpcomingFestivals(5);
upcoming.forEach(({ festival, date, daysUntil }) => {
  console.log(`${festival.name} - ${date} (${daysUntil} days away)`);
});
// Dussehra         - 2025-10-02 (1 days away)
// Karwa Chauth     - 2025-10-10 (9 days away)
// Dhanteras        - 2025-10-18 (17 days away)
// Diwali           - 2025-10-20 (19 days away)
// Govardhan Puja   - 2025-10-21 (20 days away)

// Very next festival
const next = getNextFestival();
console.log(`Next: ${next?.festival.name} in ${next?.daysUntil} days`);

// Today's festivals
const today = getTodaysFestivals();
if (today.length === 0) console.log("No festivals today");

// This week
const week = getThisWeeksFestivals();
week.forEach(({ festival, daysUntil }) => {
  console.log(`${festival.name} in ${daysUntil} days`);
});

🔎 Search & Filter Utilities

| Function | Returns | Description | |----------|---------|-------------| | searchFestivals(query) | { festival, matchScore }[] | Search with relevance score | | filterFestivals(filters) | Festival[] | Filter by multiple criteria | | getFestivalsByState(state) | Festival[] | Festivals celebrated in a state | | getFestivalsByRegion(region) | Festival[] | Festivals by region | | getFestivalsByType(type) | Festival[] | Festivals by type (LUNAR, FIXED) | | getFestivalsByCategory(category) | Festival[] | Festivals by category | | getAllRegions() | string[] | All unique regions | | getAllStates() | string[] | All unique states | | getAllTypes() | string[] | All unique types | | getRelatedFestivals(slug) | Festival[] | Related festivals | | getFestivalCount() | number | Total festival count |

import { searchFestivals, filterFestivals, getFestivalsByState } from 'indian-festivals';

// Search with relevance score
const results = searchFestivals("light");
results.slice(0, 3).forEach(({ festival, matchScore }) => {
  console.log(`${festival.name}: ${matchScore}`);
});
// Diwali: 180  (matches name + "Festival of Lights" + keywords)
// Kali Puja: 40

// Advanced filter
const filtered = filterFestivals({
  religion: "Hindu",
  isPublicHoliday: true,
  state: "Maharashtra"
});
filtered.forEach(f => console.log(f.name));
// Holi, Ganesh Chaturthi, Diwali, Dussehra...

// Filter by duration — multi-day festivals only
const multiDay = filterFestivals({ minDuration: 2 });
multiDay.forEach(f => console.log(`${f.name} (${f.durationDays} days)`));
// Navratri (9 days), Diwali (5 days), Paryushana (8 days)...

// Festivals in a state
getFestivalsByState("West Bengal");
getFestivalsByState("Kerala");

// Total count
console.log(`Total festivals: ${getFestivalCount()}`); // 70+

💡 Usage Examples

FID Lookup

import { getFestivalByFID, getFestivalsByFIDs } from 'indian-festivals';

// Get a single festival by FID
const diwali = getFestivalByFID("FIDH05");
console.log(diwali?.name); // "Diwali"

// Get multiple festivals by FIDs — perfect for travel itineraries!
const festivals = getFestivalsByFIDs(["FIDH05", "FIDH12", "FIDS01"]);
// Returns [Diwali, Holi, Baisakhi] — complete data for all three

Festival Lookup

import { getFestivalBySlug, getFestivalByName, festivalExists } from 'indian-festivals';

getFestivalBySlug("diwali");
getFestivalByName("Deepavali");   // also checks alternateNames
festivalExists("holi");           // true

Religion-based

import { getFestivalsByReligion, getFestivalsByReligions, getFestivalCountByReligion } from 'indian-festivals';

getFestivalsByReligion("Hindu");
getFestivalsByReligions(["Hindu", "Sikh"]);
getFestivalCountByReligion();
// { Hindu: 28, Islamic: 5, Christian: 5, ... }

Month & Date

import { getFestivalsByMonth, getFestivalsOnDate, getFestivalsInDateRange } from 'indian-festivals';

// All festivals in October 2025
getFestivalsByMonth(10, 2025);

// Festivals on a specific date
getFestivalsOnDate("2025-10-20");

// Festivals in a date range
getFestivalsInDateRange("2025-10-01", "2025-12-31", 2025);

Upcoming Festivals

import { getUpcomingFestivals, getNextFestival, getTodaysFestivals } from 'indian-festivals';

getUpcomingFestivals(5);   // next 5 festivals
getNextFestival();         // the very next one
getTodaysFestivals();      // festivals today
getThisWeeksFestivals();   // festivals this week
getThisMonthsFestivals();  // festivals this month

Search & Filter

import { searchFestivals, filterFestivals, getFestivalsByState } from 'indian-festivals';

// Search by keyword
searchFestivals("light");  // returns Diwali, etc.

// Filter by multiple criteria
filterFestivals({
  religion: "Hindu",
  isPublicHoliday: true,
  state: "Maharashtra"
});

// Festivals in a specific state
getFestivalsByState("West Bengal");

Full Implementation Example

import {
  getFestivalByFID,
  getFestivalsByFIDs,
  getUpcomingFestivals,
  getFestivalsByState,
  searchFestivals,
  getFestivalCountByReligion
} from 'indian-festivals';

// Travel itinerary — get complete data for selected festivals
const itinerary = getFestivalsByFIDs(["FIDH05", "FIDH12", "FIDS01", "FIDN05"]);
console.log(itinerary.map(f => `${f.name} → ${f.dates[2025]}`));

// Dashboard — upcoming festivals
const upcoming = getUpcomingFestivals(10);

// State page — festivals in Kerala
const keralaFestivals = getFestivalsByState("Kerala");

// Search
const results = searchFestivals("harvest");

// Stats
const stats = getFestivalCountByReligion();
console.log(stats);
// { Hindu: 28, Islamic: 5, Christian: 5, Sikh: 6, ... }

🗂️ Festival Data Structure

Each festival contains the following fields:

{
  id: string;              // "diwali"
  code: string;            // "H05" — internal code
  slug: string;            // "diwali"
  festivalCode: string;    // "DIWALI"

  name: string;            // "Diwali"
  alternateNames: string[];// ["Deepavali", "Festival of Lights"]

  religion: string;        // "Hindu"
  regions: string[];       // ["Pan India"]
  category: string;        // "Religious"
  type: string;            // "LUNAR" | "FIXED"

  states: string[];        // All states where celebrated
  districts: string[];

  description: string;
  significance: string;
  history: string;

  dates: {                 // Dates from 2025 to 2030
    2025: string;          // "2025-10-20"
    2026: string;
    2027: string;
    2028: string;
    2029: string;
    2030: string;
  };

  hinduCalendar: {
    month: string;         // "Kartika"
    paksha: string;        // "Krishna Paksha"
    tithi: string;         // "Amavasya"
  };

  islamicCalendar: {
    day: number | null;
    month: string;
  };

  isPublicHoliday: boolean;
  isRestrictedHoliday: boolean;
  durationDays: number;

  customs: string[];
  foods: string[];
  rituals: string[];

  relatedFestivals: string[];

  image: string;
  images: string[];
  video: string;
  videos: string[];

  wikipedia: string;
  officialSources: string[];
  keywords: string[];
  popularity: string[];
}

🌐 Works With

| Environment | Support | |--------------------|---------| | Node.js (CommonJS) | ✅ | | Node.js (ESM) | ✅ | | TypeScript | ✅ | | React | ✅ | | Next.js | ✅ | | Vite | ✅ | | Plain JavaScript | ✅ |


🤝 Contributing

Contributions, feature requests, and suggestions are welcome!

If you'd like to add new festivals, fix dates, improve descriptions, or add new utility functions, feel free to open an issue or submit a pull request.


📄 License

This project is licensed under the MIT License.


👨‍💻 Author

Kuntal Ojha


❤️ Support the Project

Your support helps maintain and expand the festival database with more festivals, better coverage, and future years.