Repository navigation
0.9.71
temporal-fmt v0.9.71
Added
numberingSystem/parseNumberingSystemaccept'auto'— resolves
whichever numeral system the call's own locale actually uses, via
Intl.NumberFormat(locale).resolvedOptions().numberingSystem, instead of
making the caller hardcode a system code per locale.{ numberingSystem: 'auto', locale: 'ar-EG' }gets Arabic-Indic digits,bn-BDgets Bengali,
en-USstays ASCII — same option, no per-locale branching in caller code.
Works the same on the parse side, and throughcreateConfig(): a config's
numberingSystem: 'auto'resolves per call against whichever locale that
call ends up using, so one shared config can drive different digits for
different callers instead of pinning a single system. Default's still
'latn', so if you're not passing the option, nothing about your existing
calls changes. When a locale's native system isn't one this library can
transliterate — Thai, Lao, Myanmar —'auto'falls back to'latn'rather
than throwing; only a malformed locale tag throws.
Fixed
MMMM/MMM/EEEE/EEE(and stand-aloneLLLL/cccc) rendered the
wrong month or weekday for dates before October 15, 1582. Turns out ICU's
gregorycalendar applies a Julian cutover at that date —Intl.Date- TimeFormatwas silently reinterpreting anything earlier under Julian
rules, even thoughTemporalitself is proleptic Gregorian throughout.
1500-07-05would come back labeled "June," on the wrong weekday, because
Julian ran about 10 days behind proleptic Gregorian by then. Numeric tokens
were never affected — they don't touchIntlat all, only the name lookups
did. Fixed by never handing Intl the historical date in the first place:
the month/weekday number now comes straight offTemporal's own proleptic
fields, then gets looked up against a safe modern reference date (the same
ones the locale vocab already builds from, so format output still parses
straight back). Non-Gregorian-calendar objects — Hebrew, Islamic — were
never touched by the bug and aren't touched by the fix either; ICU doesn't
apply this cutover to them, so that path was already correct.
Docs
- README's "Known limitations" section is gone. Every item in it had
already grown a fuller writeup somewhere else in the doc — this was just a
stale summary duplicating them. Two of those sections picked up a line
this changelog entry made newly relevant: the actual fix for ambiguous
glued tokens is zero-padding or a separator, not just thelenientflag;
andxxxis the one offset token that can carry a sub-minute historical
offset (Europe/Londonpre-1847) through verbatim, where the other five
throw.