You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,8 @@ The majority of these changes were made in the June 2024 TC39 meeting (slides [h
35
35
- Removed `withPlainDate()` methods. Instead use `with({ year, monthCode, day })`.
36
36
- Removed `toPlainDateTime()` and `toZonedDateTime()` methods of `Temporal.PlainTime`. Instead use the same-named methods on `Temporal.PlainDate` to combine a date and a time.
37
37
- Removed `epochSeconds` and `epochMicroseconds` properties. Instead calculate epoch seconds with `Math.floor(epochMilliseconds / 1000)` and epoch microseconds with `epochNanoseconds / 1000n + ((epochNanoseconds % 1000n) < 0n ? -1n : 0n)`.
38
+
- Removed `Temporal.Instant.fromEpochSeconds()`. Instead use `Temporal.Instant.fromEpochMilliseconds(epochSeconds * 1000)`
39
+
- Removed `Temporal.Instant.fromEpochMicroseconds()`. Instead use `Temporal.Instant.fromEpochNanoseconds(epochMicroseconds * 1000)`
38
40
- Removed `toPlainYearMonth()` and `toPlainMonthDay()` methods of `Temporal.PlainDateTime` and `Temporal.ZonedDateTime`. Instead use `toPlainDate()` and then the methods on `Temporal.PlainDate`.
39
41
- Removed `Temporal.Instant.prototype.toZonedDateTime` and `Temporal.Now.zonedDateTime`. Instead use `toZonedDateTimeISO()`/`zonedDateTimeISO()` to create a `Temporal.ZonedDateTime` object using the ISO8601 calendar, and then use `withCalendar()` if a non-ISO calendar is desired.
40
42
- The `relativeTo` parameter is no longer accepted in `Temporal.Duration.prototype.add` and `subtract`. Instead take the `relativeTo` object, add the two durations to it, and difference it with the original using `until()`.
0 commit comments