Commit graph

13 commits

Author SHA1 Message Date
Aric Camarata
ee6c78d68f chore: bump to v1.0.4 2026-06-13 11:52:28 -04:00
Aric Camarata
4d414b2056 build: use prepack hook so npm pack/publish reliably emit index.d.mts 2026-06-13 10:11:20 -04:00
Aric Camarata
750f7e19ad chore: bump to v1.0.3 2026-06-10 16:50:19 -04:00
Aric Camarata
d12117f000 fix: local-day adapter semantics with exact round-trips on hijri-core's UTC-day contract
Behavior changes (lock-step with hijri-core fix/utc-day-boundary):

- toHijriDate and all field/format/comparison/arithmetic functions now lift input
  Dates through localDayToUtcSlot() before calling coreToHijri(), reading the
  caller's LOCAL calendar day (date-fns convention). Previously passed the raw
  Date which caused off-by-one results in timezones west of UTC against the new
  UTC-day core contract.

- fromHijriDate now returns local-midnight Dates (new Date(y, m, d)) instead of
  UTC midnight. Local field accessors and date-fns format() render the intended
  calendar day on every host timezone. toISOString() is no longer the right API
  for this value.

- addHijriMonths, addHijriYears, startOfHijriMonth, endOfHijriMonth call
  fromHijriDate directly; the utcMidnightToLocalNoon shim is removed.

- Round-trip toHijriDate(fromHijriDate(y, m, d)) is now exact on every timezone.

Verified: 58/58 ESM tests, 10/10 CJS tests, 16/16 vitest assertions across
TZ=UTC, TZ=America/New_York, and TZ=Pacific/Auckland.
2026-06-10 16:38:32 -04:00
Aric Camarata
f260912927 ci: fix eslint config files pattern, add @typescript-eslint direct devDeps, fix prettier formatting 2026-05-31 08:47:50 -04:00
Aric Camarata
b96d6fc921 chore: bump to v1.0.2 2026-05-30 19:12:47 -04:00
Aric Camarata
e8ade1f9c4 docs: add TypeDoc API generation (typedoc@0.28.19 + typedoc-plugin-markdown@4.11.0)
Add typedoc and typedoc-plugin-markdown as devDependencies. Add typedoc.json config
targeting src/index.ts with markdown output to .github/wiki/api. Add docs script to
package.json. Generate initial API reference pages.

Part of T-E8-03 — TypeDoc automation for all 12 JS/TS packages.
2026-05-30 16:41:59 -04:00
Aric Camarata
a86df7dc09 chore: adopt shared config packages (tsconfig, eslint, prettier) 2026-05-30 15:09:58 -04:00
Aric Camarata
d19c624bce ci: corepack before setup-node, scope prettier to src/, emit d.mts 2026-05-29 20:05:34 -04:00
Aric Camarata
b6ee6e0331 chore: bump to v1.0.1
- Flatten exports map to ADR-015 standard
- Add coverage script (c8)
- Migrate CI to corepack enable
2026-05-28 13:54:59 -04:00
Aric Camarata
815c0418a4 refactor: code quality improvements across the board 2026-03-08 11:37:32 -04:00
Aric Camarata
536f1c5189 chore: CR/QA polish for v1.0.0 release
Fix documentation style (no em dashes). Update hijri-core devDep
from file: path to ^1.0.0.
2026-02-25 15:14:11 -05:00
Aric Camarata
d8c5398fdf feat: initial release of date-fns-hijri v1.0.0
Functional Hijri date utility library in date-fns style. 17 exported
functions: toHijriDate, fromHijriDate, isValidHijriDate, getHijriYear,
getHijriMonth, getHijriDay, getDaysInHijriMonth, getHijriMonthName,
getHijriWeekdayName, formatHijriDate, addHijriMonths, addHijriYears,
startOfHijriMonth, endOfHijriMonth, isSameHijriMonth, isSameHijriYear,
getHijriQuarter. All delegate to hijri-core. UTC-midnight-to-local-noon
correction applied in arithmetic functions to avoid timezone boundary
drift. 55 ESM + 10 CJS tests passing. Dual CJS/ESM build.
2026-02-25 14:15:24 -05:00