{"_id":"@0xdolan/tsroj","_rev":"4-210ee7b1f6583bbaba804fa64caab942","name":"@0xdolan/tsroj","dist-tags":{"latest":"1.0.6"},"versions":{"1.0.0":{"name":"@0xdolan/tsroj","version":"1.0.0","keywords":["kurdish","calendar","date","roj","datetime","solar"],"author":"","license":"GPL-3.0","_id":"@0xdolan/tsroj@1.0.0","maintainers":[{"name":"0xdolan","email":"0xdolan@gmail.com"}],"dist":{"shasum":"061eb7eeb940b70acea3400ada4eb63c528b454a","tarball":"https://registry.npmjs.org/@0xdolan/tsroj/-/tsroj-1.0.0.tgz","fileCount":22,"integrity":"sha512-X7rWq5/aDKM3Pf+dgfOO6KaAB4PcQ/tD+9v7JtEa3UT8re+3uyB0Rw3KdzonN+d66TdUiWwvunHktnPysViSGA==","signatures":[{"sig":"MEUCIG1MtBF25QOMSSJBFPCA57LDJMIr6/4lo9leBueNVow7AiEAh54BL4vt37h2wJAyz/F+uEQg8hWWOjhGLTNiG0Ff7zk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":213467},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","gitHead":"64a23668990a09815ba5ae6c843baf8555bf3ee3","scripts":{"lint":"tsc --noEmit && biome check src tests","test":"vitest run","build":"tsup src/index.ts --format cjs,esm --dts","format":"biome format --write src tests","test:watch":"vitest"},"_npmUser":{"name":"0xdolan","email":"0xdolan@gmail.com"},"_npmVersion":"11.7.0","description":"The definitive TypeScript library for the Kurdish solar calendar.","directories":{},"_nodeVersion":"24.12.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","vitest":"^1.4.0","typescript":"^5.4.0","@types/node":"^20.0.0","@biomejs/biome":"^2.4.10"},"_npmOperationalInternal":{"tmp":"tmp/tsroj_1.0.0_1775025761463_0.4712649930650368","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@0xdolan/tsroj","version":"1.0.1","keywords":["kurdish","calendar","date","roj","datetime","solar"],"author":"","license":"GPL-3.0","_id":"@0xdolan/tsroj@1.0.1","maintainers":[{"name":"0xdolan","email":"0xdolan@gmail.com"}],"dist":{"shasum":"41e089ff9847fd35cd6ca11581085cb3d35e7fce","tarball":"https://registry.npmjs.org/@0xdolan/tsroj/-/tsroj-1.0.1.tgz","fileCount":14,"integrity":"sha512-+C3sjL+LC12/hn+hch/9DT8msyyS5lcb3TDGT1Y26eV7XyWJdvWP6rh4cp6P3A2ZPrgu6f4y8sdcsylpFcr9ng==","signatures":[{"sig":"MEUCIEU6ipzrQd987+axvCWvgw7A++RjLAyyCJvdSxxxuA1sAiEAgNfzOSn6izPn3Rr5t4xax30eCQvq05yMPkEPg/ARBG0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":203150},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","gitHead":"4c9c0581931271c4807716b6017953c0ab7d7097","scripts":{"lint":"tsc --noEmit && biome check src tests","test":"vitest run","build":"tsup src/index.ts --format cjs,esm --dts","format":"biome format --write src tests","test:watch":"vitest"},"_npmUser":{"name":"0xdolan","email":"0xdolan@gmail.com"},"_npmVersion":"11.7.0","description":"The definitive TypeScript library for the Kurdish solar calendar.","directories":{},"_nodeVersion":"24.12.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","vitest":"^1.4.0","typescript":"^5.4.0","@types/node":"^20.0.0","@biomejs/biome":"^2.4.10"},"_npmOperationalInternal":{"tmp":"tmp/tsroj_1.0.1_1775028428478_0.3994039960319189","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@0xdolan/tsroj","version":"1.0.3","keywords":["kurdish","calendar","date","roj","datetime","solar"],"author":"","license":"GPL-3.0","_id":"@0xdolan/tsroj@1.0.3","maintainers":[{"name":"0xdolan","email":"0xdolan@gmail.com"}],"homepage":"https://github.com/0xdolan/tsroj#readme","bugs":{"url":"https://github.com/0xdolan/tsroj/issues"},"dist":{"shasum":"3630f5abcfcacc35f93b01e7412a1e8856908c69","tarball":"https://registry.npmjs.org/@0xdolan/tsroj/-/tsroj-1.0.3.tgz","fileCount":14,"integrity":"sha512-LjuddDfn8VApSZecIBS7IFYkQLrswPvymJbSTTGVcfpzXHQ7XLJPM3vWZ61+yu2K959JhsbGchBLUUsnGZ3u4g==","signatures":[{"sig":"MEUCIQCRCItGdm5FeYQNSJD2mV7UwuSbo3+EVL16+tS7FH0uYQIgOokzT+ltwYiow/1YCNY/SqY9/dQmG5ZnDwcrPQdqhhA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@0xdolan%2ftsroj@1.0.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":203407},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","gitHead":"4e0c6ea45e29de1453d38b7cb7aec9a99ac6aa11","scripts":{"lint":"biome check src/ tests/","test":"vitest run","build":"tsup src/index.ts --format cjs,esm --dts","lint:fix":"biome check --write src/ tests/"},"_npmUser":{"name":"0xdolan","email":"0xdolan@gmail.com"},"repository":{"url":"git+https://github.com/0xdolan/tsroj.git","type":"git"},"_npmVersion":"10.9.4","description":"The definitive TypeScript library for the Kurdish solar calendar.","directories":{},"_nodeVersion":"22.22.1","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","vitest":"^1.4.0","typescript":"^5.4.0","@types/node":"^20.0.0","@biomejs/biome":"^2.4.10"},"_npmOperationalInternal":{"tmp":"tmp/tsroj_1.0.3_1775097987601_0.7528120714191144","host":"s3://npm-registry-packages-npm-production"}},"1.0.6":{"name":"@0xdolan/tsroj","version":"1.0.6","description":"The definitive TypeScript library for the Kurdish solar calendar.","main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","scripts":{"build":"tsup src/index.ts --format cjs,esm --dts","build:demo":"npm run build --prefix demo","test":"vitest run","test:watch":"vitest","lint":"tsc --noEmit && biome check src tests","format":"biome format --write src tests","lint:fix":"biome check --write src tests","ci":"npm run lint && npm run test && npm run build && npm run build:demo"},"repository":{"type":"git","url":"git+https://github.com/0xdolan/tsroj.git"},"bugs":{"url":"https://github.com/0xdolan/tsroj/issues"},"homepage":"https://github.com/0xdolan/tsroj#readme","keywords":["kurdish","calendar","date","roj","datetime","solar"],"author":"","license":"GPL-3.0","devDependencies":{"@biomejs/biome":"^2.4.10","@types/node":"^20.0.0","tsup":"^8.0.0","typescript":"^5.4.0","vitest":"^3.2.6"},"overrides":{"esbuild":"^0.28.1"},"gitHead":"64e05230b7884e3ee423d8940ce594907b0002b9","_id":"@0xdolan/tsroj@1.0.6","_nodeVersion":"22.23.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-dt/x//OIlcFIR1rT8m/iniq7GUNJU6irRF84ZjNNVHwqK2tSllWgLnPyWxDdWCSKoemIr60GkMzFkRlm97ecWA==","shasum":"cff936dd2ef6e4cb0a0e380d9cebb8fa3b899076","tarball":"https://registry.npmjs.org/@0xdolan/tsroj/-/tsroj-1.0.6.tgz","fileCount":25,"unpackedSize":207871,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@0xdolan%2ftsroj@1.0.6","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIG7QPhf7hmu8AQGm76FogCfiA5Df1XuzHvvRtlw5a0tqAiEAzNvDmIYfpeARb7LVaql7W7qSspuc0ImRVAE0LB+ZQgQ="}]},"_npmUser":{"name":"0xdolan","email":"0xdolan@gmail.com"},"directories":{},"maintainers":[{"name":"0xdolan","email":"0xdolan@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/tsroj_1.0.6_1782464066515_0.8411448840864881"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-01T06:42:41.325Z","modified":"2026-06-26T08:54:26.933Z","1.0.0":"2026-04-01T06:42:41.607Z","1.0.1":"2026-04-01T07:27:08.607Z","1.0.3":"2026-04-02T02:46:27.747Z","1.0.6":"2026-06-26T08:54:26.694Z"},"bugs":{"url":"https://github.com/0xdolan/tsroj/issues"},"license":"GPL-3.0","homepage":"https://github.com/0xdolan/tsroj#readme","keywords":["kurdish","calendar","date","roj","datetime","solar"],"repository":{"type":"git","url":"git+https://github.com/0xdolan/tsroj.git"},"description":"The definitive TypeScript library for the Kurdish solar calendar.","maintainers":[{"name":"0xdolan","email":"0xdolan@gmail.com"}],"readme":"<div align=\"center\">\n  <img src=\"./assets/logo.png\" alt=\"tsroj logo\" width=\"250\" />\n</div>\n\n# tsroj — Kurdish Solar Calendar\n\n**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**.\n\n[![npm version](https://img.shields.io/npm/v/@0xdolan/tsroj)](https://www.npmjs.com/package/@0xdolan/tsroj)\n[![License: GPL-3.0](https://img.shields.io/badge/License-GPL--3.0-blue.svg)](LICENSE)\n\n- **Package**: [@0xdolan/tsroj on npm](https://www.npmjs.com/package/@0xdolan/tsroj)\n- **Repository**: [github.com/0xdolan/tsroj](https://github.com/0xdolan/tsroj)\n- **Live demo**: [0xdolan.github.io/tsroj](https://0xdolan.github.io/tsroj/)\n- **Year range**: `1..9999` (aligned with native limits)\n- **Week start**: Saturday (Kurdish / Persian convention)\n\n## Install\n\n```bash\nnpm i @0xdolan/tsroj\n```\n\n```bash\npnpm add @0xdolan/tsroj\n```\n\n```bash\nyarn add @0xdolan/tsroj\n```\n\n## Quick start\n\n```typescript\nimport { KurdishDate, KurdishDateTime } from \"@0xdolan/tsroj\";\n\n// From Gregorian\nconst kd = KurdishDate.fromGregorian(new Date(2026, 5, 26));\nconsole.log(kd.year, kd.month, kd.day); // 2726, 4, 5\n\n// Native Kurdish date\nconst native = new KurdishDate(2726, 4, 5);\n\n// Conversions\nconsole.log(native.toGregorian()); // [2026, 6, 26]\nconsole.log(native.toPersian());   // [1405, 4, 5]\nconsole.log(native.toIslamic());   // [1448, 1, 10]\n\n// Date + time\nconst now = KurdishDateTime.now();\nconsole.log(now.strftime(\"%I:%M %p\", { locale: \"ckb\" }));\n```\n\n## Locales & calendars\n\nSupported locale codes: `en`, `ckb` (Sorani), `kmr` (Kurmanji), `fa`, `ar`, `tr`.\n\nDialect aliases (`sdh`, `lki`, `zza`, `ku`, …) resolve to the nearest loaded bundle (`ckb` or `kmr`).\n\n| Calendar   | Month names from |\n|-----------|------------------|\n| Kurdish solar | User locale bundle |\n| Gregorian     | User locale bundle |\n| Persian       | Canonical `fa` bundle |\n| Islamic       | Canonical `ar` bundle |\n\nLocale data lives under `src/locales/<code>/common.json` with i18next-style variant groups (`names`, `short`, `min`).\n\n## Formatting (`strftime`)\n\n```typescript\nconst kd = new KurdishDate(2726, 4, 5);\n\n// Sorani month names (month 4 = پووشپەڕ)\nkd.strftime(\"%B\", { locale: \"ckb\" }); // پووشپەڕ\n\n// Month / weekday variants (index or exact name)\nkd.strftime(\"%B %b\", { locale: \"ckb\", monthVariant: 1 });\nkd.strftime(\"%A %a %E\", { locale: \"kmr\", weekdayVariant: 1 });\n\n// Locale digits\nkd.strftime(\"%Y\", { locale: \"ckb\", useLocaleDigits: true }); // ٢٧٢٦\n\n// Manual overrides (highest priority)\nkd.strftime(\"%B %A\", {\n  locale: \"ckb\",\n  month: \"CustomMonth\",\n  weekday: \"CustomDay\",\n});\n```\n\n### Sorani ezafe (ی) — `ckb` only\n\nEnabled by default; disable per option:\n\n| Option | When | Example |\n|--------|------|---------|\n| `ezafeAfterDay` | Day + month name in pattern | `5ی پووشپەڕ` |\n| `ezafeOnMonth` | Day + month name + year in pattern | `5ی پووشپەڕی 2726` |\n\n```typescript\nkd.strftime(\"%d %B %Y\", { locale: \"ckb\" });\n// 5ی پووشپەڕی 2726\n\nkd.strftime(\"%d %B %Y\", {\n  locale: \"ckb\",\n  ezafeAfterDay: false,\n  ezafeOnMonth: false,\n});\n// 5 پووشپەڕ 2726\n```\n\n### Leading zero — `ckb`, `fa`, `ar`\n\n`leadingZero` defaults to **`false`** for these locales (`%d`, `%m`, and time tokens omit padding). Set `leadingZero: true` to pad.\n\n```typescript\nkd.strftime(\"%d/%m\", { locale: \"ckb\" }); // 5/4\nkd.strftime(\"%d/%m\", { locale: \"en\" });  // 05/04\n```\n\n### strftime tokens\n\n`%A` `%a` `%E` (weekday min) `%B` `%b` `%Y` `%y` `%m` `%-m` `%d` `%-d` `%w` `%-w` `%H` `%I` `%M` `%S` `%p`\n\n### `FormatCalendarOptions`\n\n| Option | Description |\n|--------|-------------|\n| `locale` | Locale code |\n| `calendar` | `kurdish` · `gregorian` · `persian` · `islamic` |\n| `monthVariant` | Month variant index or exact name |\n| `weekdayVariant` | Weekday variant index or exact name |\n| `useLocaleDigits` | Use locale digit glyphs |\n| `leadingZero` | Pad numeric tokens (default off for ckb/fa/ar) |\n| `ezafeAfterDay` | Sorani ی after day (default on for ckb) |\n| `ezafeOnMonth` | Sorani ی on month when year present (default on for ckb) |\n| `month`, `weekday`, … | Manual label overrides |\n| `overrides` | Nested override object |\n\n## Interactive demo\n\n```bash\nnpm run build          # build library (updates dist types for demo)\ncd demo && npm install && npm run dev\n```\n\nOpen **http://localhost:5173/tsroj/** — live clock, four calendar systems, searchable timezone picker, locale variants, Sorani grammar toggles, and copyable examples.\n\nDeployed at **https://0xdolan.github.io/tsroj/**.\n\n<p align=\"center\">\n  <a href=\"https://0xdolan.github.io/tsroj/\">\n    <img src=\"assets/demo-screenshot.png\" alt=\"tsroj interactive demo — click to open live site\" width=\"100%\" />\n  </a>\n</p>\n\n<p align=\"center\"><sub>To embed on your own site (after deploy), use:<br><code>&lt;iframe src=\"https://0xdolan.github.io/tsroj/\" title=\"tsroj demo\" width=\"100%\" height=\"820\" loading=\"lazy\"&gt;&lt;/iframe&gt;</code></sub></p>\n\n## Development\n\n```bash\nnpm run test    # Vitest\nnpm run lint    # TypeScript + Biome\nnpm run build   # tsup → dist/\n```\n\nBranch flow: `feature/*` → `develop` → `main`.\n\n## Security\n\nStatic locale JSON only — no `eval()`, no prototype pollution vectors. See [SECURITY.md](SECURITY.md).\n\n## License\n\n[GPL-3.0](LICENSE)\n","readmeFilename":"README.md"}