Skip to content

Releases: fullcalendar/temporal-polyfill

v0.3.0

28 Mar 20:30
Compare
Choose a tag to compare
  • Updated to March 2025 version of Temporal spec (#47). Including but not limited to:
    • timeZones can ONLY be strings; no longer accepts custom objects
    • calendars can ONLY be strings; no longer accepts custom objects
    • Temporal.TimeZone class removed; most functionality exists on Temporal.ZonedDateTime
      • Added zonedDateTime.getTimeZoneTransition()
    • Temporal.Calendar class removed; all functionality exists on Plain/Zoned types
    • .getISOFields() methods removed on all Plain/Zoned types
    • Better conformance for Intl.DateTimeFormat
    • Many removals, with alternatives:
// Temporal.Now

 Temporal.Now.zonedDateTime(calendar)
 Temporal.Now.zonedDateTimeISO().withCalendar(calendar)

 Temporal.Now.plainDateTime(calendar)
 Temporal.Now.plainDateTimeISO().withCalendar(calendar)

 Temporal.Now.plainDate(calendar)
 Temporal.Now.plainDateISO().withCalendar(calendar)

// Temporal.Instant

 Temporal.Instant.fromEpochSeconds(seconds)
 Temporal.Instant.fromEpochMilliseconds(seconds * 1000)

 Temporal.Instant.fromEpochMicroseconds(micro)
 Temporal.Instant.fromEpochNanoseconds(micro * 1000n)

 instant.epochSeconds
 instant.epochMilliseconds / 1000

 instant.epochMicroseconds
 instant.epochNanoseconds / 1000n

 instant.toZonedDateTime()
 instant.toZonedDateTimeISO().withCalendar(cal)

// Temporal.ZonedDateTime

 zonedDateTime.epochSeconds
 zonedDateTime.epochMilliseconds / 1000

 zonedDateTime.epochMicroseconds
 zonedDateTime.epochNanoseconds / 1000n

 zonedDateTime.withPlainDate(plainDate)
 plainDate.toZonedDateTime({
     plainTime: zonedDateTime,
     timeZone: zonedDateTime.timeZone,
   })

 zonedDateTime.toPlainYearMonth()
 zonedDateTime.toPlainDate().toPlainYearMonth()

 zonedDateTime.toPlainMonthDay()
 zonedDateTime.toPlainDate().toPlainMonthDay()

// Temporal.PlainDateTime

 plainDateTime.toPlainYearMonth()
 plainDateTime.toPlainDate().toPlainYearMonth()

 plainDateTime.toPlainMonthDay()
 plainDateTime.toPlainDate().toPlainMonthDay()

 plainDateTime.withPlainDate(plainDate)
 plainDate.toPlainDateTime(plainDateTime)

// Temporal.PlainTime

 plainTime.toPlainDateTime(plainDate)
 plainDate.toPlainDateTime(plainTime)

 plainTime.toZonedDateTime({ plainDate, timeZone })
 plainDate.toZonedDateTime({ plainTime, timeZone })

Learn more about these breaking changes »

v0.3.0-beta.1

12 Mar 02:56
Compare
Choose a tag to compare
v0.3.0-beta.1 Pre-release
Pre-release

Fixed JS property names being mangled incorrectly in global.min.js and global.esm.js, leading to critical issues:

  • v0.3.0-beta crashes with Invalid protocol results (#66)
  • Temporal.Instant parsing broken in v0.3.0-beta? (#67)
  • CI environment incorrectly always testing global.js regardless of matrix

v0.3.0-beta

11 Mar 03:28
Compare
Choose a tag to compare
v0.3.0-beta Pre-release
Pre-release

UPDATE: Use the v0.3.0-beta.1 hotfix instead.

See v0.3.0 release notes for full upgrade guide.

v0.2.5

31 May 04:33
Compare
Choose a tag to compare

v0.2.4

06 Apr 01:19
Compare
Choose a tag to compare
  • conformance to latest spec (Apr 2024)
  • fix: Typescript error when using CommonJS module outputs (#35)
  • fix: PlainTime.toString() throws error with SWC minifier (#36)
  • fix: temporal-spec types updated for weekOfYear/yearOfWeek

v0.2.3

01 Mar 04:33
Compare
Choose a tag to compare
  • fix: more readable error message when no valid fields specified (#30)
  • fix: more readable error message when unit is out of range
  • fix: non-iso/gregory calendars dayOfYear/weekOfYear off-by-one
  • conformance to latest spec
    • yearOfWeek/weekOfYear should return undefined for non-iso/gregory calendars
    • updates to since/until algorithm
    • more validation of custom timeZones' returned instants
    • more validation of Duration units, max values
    • prevent legacy ICU time zone IDs
    • don't normalize the islamicc calenadar name to islamic-civil

v0.2.2

21 Feb 03:41
Compare
Choose a tag to compare
  • fix: when importing 'temporal-polyfill' or 'temporal-polyfill/impl',
    the symbol DateTimeFormat is exported when in fact Intl should be exported
    according to the temporal-spec package. (#28)
    Potentially BREAKING CHANGE for vanilla JS users importing DateTimeFormat.
  • fix: closed off potential attack vector for ReDoS attacks on regular
    expressions that parse ISO datetime strings (76a6aca)

v0.2.1

06 Feb 03:14
Compare
Choose a tag to compare
  • fix: dayOfWeek/yearOfWeek/weekOfYear incorrectly using local time (#26, #27)
  • fix: Compliant string-level normalization of time zone IDs (mentioned in #3)
  • fix: DateTimeFormat constructor cannot be invoked without new (#25)
  • fix: DateTimeFormat::format correctly implemented as bound getter
  • fix: Duration::toLocaleString falls back to toString
  • feature: better tree-shakability for ESM

v0.2.0

07 Jan 10:06
Compare
Choose a tag to compare
  • Updated with latest test262 conformance tests (Nov 2023) (#3). All tests passing barring intentional deviations from spec, documented in README.
  • Breaking changes include all those mentioned here and normative changes introduced between May 2023 - Nov 2023, most notably changes to "user-visible operations".
  • Size of minified+gzipped bundle increased from 17.3 kB -> 20.0 kB due to stricter compliance with latest spec.
  • In NPM directory, all files are now top-level as opposed to within dist/. Thus, the jsDelivr URL has changed.
  • Fixed bugs: #9, #12, #13, #21
  • Improved README content, including comparison with @js-temporal/polyfill (#22)
  • Renamed github repo to fullcalendar/temporal-polyfill