7.18.0
- [update] - 2027 DST changes
-
-
- [note] -
Havanakept at −4hr, will support single-change between jan-nov
- [note] -
-
- [change] - #376 ambiguous offset input behaviour - see docs/inputs
-
- [change] - given timezone arguments are never dropped, even with inconsistent offsets
-
- [fix] - iso offsets beside a bracketed timezone are no longer ignored -
'…16:20:00Z[America/Los_Angeles]'
- [fix] - iso offsets beside a bracketed timezone are no longer ignored -
-
- [change] -
.set(input, tz)reads an input without an offset in the given timezone, like constructor
- [change] -
-
- [new] - any whole-minute offset is a fixed-offset timezone, like
'+05:14'- not only quarter-hours
- [new] - any whole-minute offset is a fixed-offset timezone, like
- [change] - interpret
'Z','UTC','Zulu', and'+00:00'more consistently -
- [fix] - trailing Z → UTC (not Etc/GMT)
-
- [new] - support
'Z'as valid iana code
- [new] - support
- [change] - non-standard offsets like
+05:17are no longer ignored - [change] - remove pretend fractional-hour iana codes like
Etc/GMT-5.5 - [change] - support season decade and century in rounding methods
- [change] - add century, decade, and season
progress()result - [change] - use
'+00:00'not'-00:00'in /temporal library - [change] - trim zero milliseconds in iso-full, like temporal does
- [new] - #344
.ceil(unit)and.floor(unit)methods - [new] - support single dst-change years '->11/07:01'
- [new] -
.ceil()and.floor()methods - like.nearest(), they don't move a date already on a boundary - [new] -
season,decadeandcenturyunits in.nearest(),.diff()and.isSame() - [new] -
decadeandcenturyin.progress() - [fix] - fractional arithmetic fixes:
-
- [fix] - 12:10 + 0.001 day = 12:11:26.400
-
- [fix] - 2020-03-08 + 0.9999 day = 1 day
-
- [fix] - +- 0.5 week = 3.5 days
- [fix] - #491 set minutes on fractional tzs (thanks bardrop)
- [fix] - #490 #492 #496 #480 unixFmt dropped values
- [fix] - month diff overcounting after a clamped leap-day (feb 29 2032 -> apr 29 2034)
- [fix] -
.progress(unit)return type is a number - [fix] - #495
dd/mm/yyyyfmt - [fix] - #493 comma-based fractional iso seconds
- [fix] - #489 better add 'season' support
- [fix] - #487 off-by-1 DST in startOf('day')
- [fix] - decimal-rounding issues is isos
- [fix] - typescript issues
- [update] - dependencies
notes: an explicit timezone is now always kept - even if the input has incompatible offsets:
// mixing -2hr offset with -8hr timezone
spacetime('2024-01-01T16:20:00-02:00', 'America/Los_Angeles')
// before: 4:20pm, Etc/GMT+2 (tz ignored)
// now: 10:20am, America/Los_Angeles (same moment)
// mixing 'Z' with a explicit timezone
spacetime('2024-01-01T16:20:00Z', 'America/Los_Angeles')
// before: 4:20pm, UTC (tz ignored)
// now: 8:20am, America/Los_Angeles (same moment)
// mixing 2 iana inputs
spacetime('2024-01-01T16:20:00[America/New_York]', 'America/Los_Angeles')
// before: 4:20pm, America/New_York (tz ignored)
// now: 1:20pm, America/Los_Angeles (same moment)
// same behaviour for .set():
const s = spacetime('2024-06-01T09:00:00', 'America/Los_Angeles')
s.set('2024-01-01T22:00:00', 'Asia/Tokyo')
// before: Jan 2 3:00pm, Asia/Tokyo (read as 10pm LA, then converted)
// now: Jan 1 10:00pm, Asia/Tokyo (read on Tokyo's clock)
see docs/input.md and #376 for details
non-standard offsets like +05:17 are now supported:
spacetime('2024-01-01T16:20:00+05:17')
// before: 4:20pm Local-time (21:20 UTC — offset silently ignored)
// now: 4:20pm, +5.23hrs time (11:03 UTC — the correct moment)
spacetime('2024-01-01T16:20:00+05:14') // 4:20pm, +05:14
spacetime('2024-01-01T16:20:00+05:30') // 4:20pm, +05:30 (was Etc/GMT-5.5)
spacetime('2024-01-01T16:20:00+05:00') // 4:20pm, Etc/GMT-5 (unchanged)
7.17.1
- [fix] - #479 year-arithmetic on leap
- [fix] - #480 issue with clamped diffs
- [fix] - #482 startOf('day') on DST change days
- [fix] - #481 .startOf('season') issue (thanks Wei-Lun!)
- [fix] - minimist dep vuln
- [fix] - brittle tests on particular days
- [update] - tzdbVersion 2026f
- [change] - #477 remove DST change from edmonton,vancouver,yellowknife,winnipeg,rainy_river,inuvik
- [change] - remove DST change from havana
- [change] - remove DST change from casablanca,el_aaiun
- [change] - use direct (more-frequent) tzdb source
- [update] - dependencies
7.17.0
-
[change] - #212 return proper titlecased IANA codes in
.whereIts() - [change] - better support for fractional arithmetic
- [new] - #350 export tzdb-version
-
[new] - experimental
spacetime/temporalwrapper - [fix] - typescript types
- [fix] - more api edge-cases
- [fix] - Preserve invalidity across api changes
- [change] - Make invalid comparisons consistently return false
-
[fix] - Prevent invalid dates hanging
.every()iteration -
[update] - overdue improvements to
spacetime-geoplugin - [update] - dependencies
7.16.0
- [change] deprecated but exposed
.ddate now is in UTC - users can dos.toNativeDate() - [change] - use UTC date methods internally to reduce bias of local computer
- [fix] - correct Chatham and NZ-CHAT transitions to 03:45 and 02:45
- [fix] - apply Lord Howe's half-hour DST shift to the Australia/LHI alias
- [fix] - hemispheres for 42 zones
- [fix] - preserve fractional timezone offsets, support UTC±14, and reject malformed offsets
- [fix] - point the North Dakota shortcut to Central time and resolve nested timezone city names
- [change] - reject malformed clock fields in date strings #450
- [change] - parse two-digit years including
12/30/19 12:22:08 PM#179 - [change] - support
{silent: false}for #451 - [fix] - midnight and noon issue in
.hour12('12am')and.hour12('12pm') - [fix] - preserve day-first parsing (
dmy) through cloning, arithmetic, and chained setters - [fix] - decade and century arithmetic, clamping leap days to the target year
- [update] - dependencies
7.15.0
- [fix] - stale dst offsets #470 (thanks Sudarshan!)
- [fix] - update dst dates for nuuk, indiana, kentucky, scoresbysund, nuuk, troll, and north dakota
- [change] - compromised support for casablanca's 4-change year
- [change] - compromised support for permanent dst in edmonton, vancouver, yellowknife
- [change] - fixes to zonefile parser
- [update] - dependencies
7.14.0
- [new] - support JavaScript's Date.toString() fmt as input #465
- [change] - clamp maximum .hour() to 0-23 #467
- [update] - edmonton and yellowknife DST hour
- [update] - dependencies
7.13.0
- [fix] - typescript config issue
- [fix] - leap-year issue #461
- [update] - Chisinau + Vancouver dst hour
- [new] - static LLM docs
- [update] - dependencies
7.12.1
- [fix] - regression for today param in object format
- [update] - github actions scripts for proper release CI
- [change] - add npm ignore-scripts=true
- [update] - dependencies
7.12.0
- [update] - update zonefile to 2026 DST dates
- [update] - update dependencies
7.11.0
- [fix] - millennium API typo (w/ backward compat)
- [update] - update CICD script
- [update] - Update Kazakhstan timezones to UTC+5
- [update] - add Coyhaique iana code
- [update] - nuuk and scoresbysund dst changes
- [update] - dependencies