-
Notifications
You must be signed in to change notification settings - Fork 0
CONTRIBUTING
github-actions[bot] edited this page May 29, 2026
·
1 revision
Thanks for your interest in contributing. This is a small, focused library and contributions are welcome.
git clone https://github.com/acamarata/date-fns-hijri.git
cd date-fns-hijri
pnpm install
pnpm build
pnpm testAll tests should pass before you start.
Check the open issues for anything tagged help wanted or good first issue. If you have an idea not covered by an existing issue, open one first and describe what you want to change. That avoids duplicate work.
- TypeScript strict mode. No
anywithout a comment explaining why. - Functional, stateless exports. No classes. No side effects.
- Each function: one purpose. If you can describe it with "and", split it.
- Run
pnpm run formatbefore committing. CI will fail on formatting issues. - Run
pnpm run lintbefore committing. Fix all warnings, not just errors.
- Add tests for any new function or changed behavior.
- Tests live in
test.mjs(ESM) andtest-cjs.cjs(CommonJS). Both must pass. - Use the native Node.js
node:testrunner. No Jest, no Vitest. - Test known Hijri dates. The
1 Ramadan 1444 = 23 March 2023pair is a good anchor.
- Keep PRs small and focused. One concern per PR.
- Write a clear description of what changed and why.
- Reference the issue number if one exists (
Fixes #42). - CI must be green before merge. This includes test, lint, typecheck, and pack-check.
The underlying calendar data and algorithms live in hijri-core, not here. If you find a date conversion error, it likely belongs there. Open an issue in hijri-core first.
By contributing, you agree that your work will be licensed under MIT. Copyright remains with Aric Camarata.
date-fns-hijri · MIT License · npm · Issues
Guides
Examples
Reference
API — Per Function
- toHijriDate
- fromHijriDate
- isValidHijriDate
- getHijriYear
- getHijriMonth
- getHijriDay
- getDaysInHijriMonth
- getHijriQuarter
- getHijriMonthName
- getHijriWeekdayName
- formatHijriDate
- addHijriMonths
- addHijriYears
- startOfHijriMonth
- endOfHijriMonth
- isSameHijriMonth
- isSameHijriYear
Community