Releases: MidnightDesign/calendrics
Releases · MidnightDesign/calendrics
Release list
v0.3.1
v0.3.0
0.3.0 (2026-08-18)
⚠ BREAKING CHANGES
Temporal\is nowCalendrics\, includingTemporal\Spec\→Calendrics\Spec\andTemporal\Exception\→Calendrics\Exception\. The marker interfaceTemporal\Exception\TemporalExceptionis nowCalendrics\Exception\CalendricsException. Requiremidnight/calendricsin place ofmidnight/temporal-php.
Features
v0.2.1
0.2.1 (2026-08-17)
Bug Fixes
- accept basic-format inline offsets in date-time-string time zone ids (#89) (056f2ba)
- range-check Duration::round()'s relativeTo anchor for every spelling (#82) (9099d86), closes #56
- resolve era/eraYear relativeTo anchors instead of rejecting them (#84) (80d60f8), closes #58
Miscellaneous Chores
v0.1.0
Initial public release.
Added
- Porcelain API (
Temporal\namespace) — PHP-native facade over the TC39 Temporal spec with strict types, readonly fields, backed enums, and named arguments:PlainDate,PlainTime,PlainDateTime,PlainYearMonth,PlainMonthDayInstant,ZonedDateTimeDurationNow(factory for current-time values)- Enums:
Calendar,Disambiguation,OffsetOption,Overflow,RoundingMode,Unit, plus display-side enums (CalendarDisplay,OffsetDisplay,TimeZoneDisplay,TransitionDirection).
- Spec layer (
Temporal\Spec\namespace) — TC39-faithful implementation, exercised by the test262 conformance suite. - ECMA-402 calendar support — 16 non-ISO calendars (Hebrew, Islamic family, Japanese, Buddhist, Chinese/Dangi, Coptic, Ethiopic family, Persian, ROC, Indian) via `IntlCalendarBridge`, with pure-PHP implementations for Hebrew and Indian.
- Factory surface per porcelain class — each class exposes a typed constructor (named arguments supported), a `parse(string)` for ISO 8601 strings, and for the five calendar-aware classes (`PlainDate`, `PlainDateTime`, `PlainYearMonth`, `PlainMonthDay`, `ZonedDateTime`) a `fromFields(...)` named-argument factory covering calendar-specific fields (`monthCode`, `era`, `eraYear`).
- Interop — `toSpec()` / `fromSpec()` on every porcelain class for bridging to the spec layer.
- Test262 conformance — 6615 passing test262 scripts, 0 failures (~494k assertions).
Deliberate deviations from TC39
The porcelain layer adapts TC39 semantics to PHP-native conventions rather than mirroring the JavaScript API shape 1:1.
- No polymorphic `from()` method. Use `parse()` for strings and `fromFields()` for calendar fields. The spec layer retains TC39-faithful `from()` for callers who need exact spec semantics.
- Named arguments, not property bags.
- Backed enums, not option strings.
Known limitations
- `Duration::round()` and `Duration::total()` throw `NotYetImplementedException` when balancing across calendar units that require a reference point.
- The `Temporal\Spec\` namespace is public PSR-4 but documented as internal; a formal BC policy for the seam will land before 1.0.0.
Install: `composer require midnight/temporal-php`
Full changelog: CHANGELOG.md