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

@0xdolan/tsroj

v1.0.6

Published

The definitive TypeScript library for the Kurdish solar calendar.

Readme

tsroj — Kurdish Solar Calendar

tsroj is a TypeScript library for the Kurdish solar calendar. Convert and format dates across Kurdish solar, Gregorian, Persian (Jalali), and Tabular Islamic systems using only native JavaScript (Date, Math) — zero runtime dependencies.

npm version License: GPL-3.0

Install

npm i @0xdolan/tsroj
pnpm add @0xdolan/tsroj
yarn add @0xdolan/tsroj

Quick start

import { KurdishDate, KurdishDateTime } from "@0xdolan/tsroj";

// From Gregorian
const kd = KurdishDate.fromGregorian(new Date(2026, 5, 26));
console.log(kd.year, kd.month, kd.day); // 2726, 4, 5

// Native Kurdish date
const native = new KurdishDate(2726, 4, 5);

// Conversions
console.log(native.toGregorian()); // [2026, 6, 26]
console.log(native.toPersian());   // [1405, 4, 5]
console.log(native.toIslamic());   // [1448, 1, 10]

// Date + time
const now = KurdishDateTime.now();
console.log(now.strftime("%I:%M %p", { locale: "ckb" }));

Locales & calendars

Supported locale codes: en, ckb (Sorani), kmr (Kurmanji), fa, ar, tr.

Dialect aliases (sdh, lki, zza, ku, …) resolve to the nearest loaded bundle (ckb or kmr).

| Calendar | Month names from | |-----------|------------------| | Kurdish solar | User locale bundle | | Gregorian | User locale bundle | | Persian | Canonical fa bundle | | Islamic | Canonical ar bundle |

Locale data lives under src/locales/<code>/common.json with i18next-style variant groups (names, short, min).

Formatting (strftime)

const kd = new KurdishDate(2726, 4, 5);

// Sorani month names (month 4 = پووشپەڕ)
kd.strftime("%B", { locale: "ckb" }); // پووشپەڕ

// Month / weekday variants (index or exact name)
kd.strftime("%B %b", { locale: "ckb", monthVariant: 1 });
kd.strftime("%A %a %E", { locale: "kmr", weekdayVariant: 1 });

// Locale digits
kd.strftime("%Y", { locale: "ckb", useLocaleDigits: true }); // ٢٧٢٦

// Manual overrides (highest priority)
kd.strftime("%B %A", {
  locale: "ckb",
  month: "CustomMonth",
  weekday: "CustomDay",
});

Sorani ezafe (ی) — ckb only

Enabled by default; disable per option:

| Option | When | Example | |--------|------|---------| | ezafeAfterDay | Day + month name in pattern | 5ی پووشپەڕ | | ezafeOnMonth | Day + month name + year in pattern | 5ی پووشپەڕی 2726 |

kd.strftime("%d %B %Y", { locale: "ckb" });
// 5ی پووشپەڕی 2726

kd.strftime("%d %B %Y", {
  locale: "ckb",
  ezafeAfterDay: false,
  ezafeOnMonth: false,
});
// 5 پووشپەڕ 2726

Leading zero — ckb, fa, ar

leadingZero defaults to false for these locales (%d, %m, and time tokens omit padding). Set leadingZero: true to pad.

kd.strftime("%d/%m", { locale: "ckb" }); // 5/4
kd.strftime("%d/%m", { locale: "en" });  // 05/04

strftime tokens

%A %a %E (weekday min) %B %b %Y %y %m %-m %d %-d %w %-w %H %I %M %S %p

FormatCalendarOptions

| Option | Description | |--------|-------------| | locale | Locale code | | calendar | kurdish · gregorian · persian · islamic | | monthVariant | Month variant index or exact name | | weekdayVariant | Weekday variant index or exact name | | useLocaleDigits | Use locale digit glyphs | | leadingZero | Pad numeric tokens (default off for ckb/fa/ar) | | ezafeAfterDay | Sorani ی after day (default on for ckb) | | ezafeOnMonth | Sorani ی on month when year present (default on for ckb) | | month, weekday, … | Manual label overrides | | overrides | Nested override object |

Interactive demo

npm run build          # build library (updates dist types for demo)
cd demo && npm install && npm run dev

Open http://localhost:5173/tsroj/ — live clock, four calendar systems, searchable timezone picker, locale variants, Sorani grammar toggles, and copyable examples.

Deployed at https://0xdolan.github.io/tsroj/.

Development

npm run test    # Vitest
npm run lint    # TypeScript + Biome
npm run build   # tsup → dist/

Branch flow: feature/*developmain.

Security

Static locale JSON only — no eval(), no prototype pollution vectors. See SECURITY.md.

License

GPL-3.0