Repository navigation
temporal-polyfill@1.0.7
·
56 commits
to main
since this release
🎉 6 Million Weekly Downloads
temporal-polyfill has passed 6 million downloads a week! Thank you to everyone using it, reporting issues and sending fixes.
📉 Size Wins
- Smaller global IIFE bundles after min+gzip, mainly from smaller string parsing:
- Basic (
global.js): 19,450 → 19,172 bytes (−1.4%) - Full (
full/global.js): 23,280 → 23,020 bytes (−1.1%)
- Basic (
🐛 Bugfixes
Wider usage has brought reports of more rare cases, so most of these fixes are for corner cases.
- FIX: Pre-1970 values round to the correct boundary in
Instant#round,Instant#toStringandZonedDateTime#toString(#110, #117, #111). Thx @vera-rubin - FIX:
ZonedDateTimeuntil/sinceand function API diffs reject equal instants in different time zones for date units (#112) - FIX: Temporal strings with malformed or misplaced annotations are rejected, such as
2024-10-03[](#119) - FIX:
ZonedDateTime.fromaccepts in-range values near theInstantlimits, such as aZstring at either end (#120) - FIX: Two offset changes close together in a time zone keep the offset between them, such as
Africa/Casablancain Ramadan, andgetTimeZoneTransitionfinds both (#121) - FIX:
Temporal.NowusesUTCwhen the host reports no system time zone throughIntl(#122) - FIX:
ZonedDateTime#withPlainTimepicks the earlier occurrence of a repeated hour, regardless of the current offset (#123) - FIX: Unminified builds no longer compute a debug string for every object on Node and similar hosts, which makes creating objects faster there (#116)
- FIX: Better correctness in these other areas:
- Rounding, including
halfEventies with aroundingIncrement,Duration#toStringwith negative or very large values, and-0results - Repeated and skipped times in
ZonedDateTimeand the function API, such asuntil/since,roundandstartOf*/endOf* - String validation, including UTC offsets, discarded offsets, non-ISO calendars and
withCalendar/withTimeZonearguments - Dates at the limits of the supported range
- Function API agreement with the class API, with and without native Temporal
getTimeZoneTransitionsearch, and Chinese and Dangi leap-month arithmetic
- Rounding, including