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

calendaryjs-plugin-hijri

v0.1.5

Published

Islamic (Hijri) calendar plugin for calendaryjs — Gregorian ↔ Hijri date conversion (tabular/civil) and Hijri recurring events.

Readme

calendaryjs-plugin-hijri

New to calendaryjs? Start with the core README — this plugin builds on its engine and builder.

Adds the Islamic (Hijri) calendar to calendaryjs: declare events by Hijri date, and convert Gregorian ↔ Hijri. Uses the tabular (civil) Islamic calendar — arithmetic, deterministic, round-trip safe.

The tabular variant is computed, not observed; a sighting-based calendar (e.g. Umm al-Qurā) may differ by ±1 day.

Install

npm i calendaryjs calendaryjs-plugin-hijri

Use it

Register the plugin, then declare Hijri events with the hijri.date() selector — the engine resolves them to Gregorian (a Hijri date can fall 0, 1 or 2 times in a Gregorian year; all occurrences are returned):

import { calendary } from "calendaryjs";
import { every } from "calendaryjs/builder";
import { hijri } from "calendaryjs-plugin-hijri";

const cal = calendary().use(hijri());

cal.addGroup({
  id: "islamic-holidays",
  events: [
    every("year").on(hijri.date(1, 1)).title("Islamic New Year"),
    every("year").on(hijri.date(10, 1)).title("Eid al-Fitr"),
    every("year").on(hijri.date(12, 10)).title("Eid al-Adha"),
  ],
});

cal.getEventsInRange("2025-01-01", "2025-12-31"); // → Gregorian dates

Prefer raw config? The selector compiles to a plain hijri event:

{ type: "hijri", id: "eid", hijriMonth: 10, hijriDay: 1, title: "Eid al-Fitr" }

Convert dates

import { gregorianToHijri, hijriToGregorian } from "calendaryjs-plugin-hijri";

gregorianToHijri({ year: 2025, month: 1, day: 1 }); // → { year, month, day }
hijriToGregorian({ year: 1446, month: 1, day: 1 }); // → { year, month, day }

Reference

Event type hijrihijriMonth (1–12) · hijriDay (1–30), plus every standard event property.

Exportshijri() · hijri.date(month, day) · gregorianToHijri · hijriToGregorian · isValidHijriDate · isHijriLeapYear · hijriMonthLength.

License

MIT. This plugin requires the calendaryjs core, which is licensed PolyForm Noncommercial — so commercial use of the combined work requires a commercial license for the core. See Commercial licensing.