Repository navigation
What's Changed
- Fix arithmetic with UTC timezone objects by @mayankdhingra02 in #150
addDays()/addMonths()/addYears()now use UTC calendar setters when given a UTC timezone object, matching the'UTC'string. Previously the object was treated as a non-UTC zone, which could shift results across DST in the host timezone and affect month-end clamping and leap years.
- fix: Duration precision, LMT offsets, and 4.7.1 by @knowledgecode in #151
Duration: Sub-millisecond parts are now rounded to the nearest nanosecond, so values like1.001no longer lose a unit to floating-point error (new Duration(1.001).toMilliseconds().toParts()→{ milliseconds: 1, microseconds: 1, nanoseconds: 0 }).format(): TheZandZZtokens now print whole minutes for zones whose offset includes seconds (e.g. Local Mean Time). The offset is truncated toward zero, asDate#getTimezoneOffset()does.- Docs: Corrected the RFC 2822
format()andparse()examples (Zinstead ofZZ), and documented howYYYYbehaves above year 9999 and the date rangeformat()andparse()support with the Buddhist calendar.
New Contributors
- @mayankdhingra02 made their first contribution in #150
Full Changelog: v4.7.0...v4.7.1