Skip to content

Commit 5830124

Browse files
aredridelptomato
authored andcommitted
Mention missed method removals in 0.5.0 change log
1 parent f3c07e5 commit 5830124

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ The majority of these changes were made in the June 2024 TC39 meeting (slides [h
3535
- Removed `withPlainDate()` methods. Instead use `with({ year, monthCode, day })`.
3636
- Removed `toPlainDateTime()` and `toZonedDateTime()` methods of `Temporal.PlainTime`. Instead use the same-named methods on `Temporal.PlainDate` to combine a date and a time.
3737
- 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)`
3840
- Removed `toPlainYearMonth()` and `toPlainMonthDay()` methods of `Temporal.PlainDateTime` and `Temporal.ZonedDateTime`. Instead use `toPlainDate()` and then the methods on `Temporal.PlainDate`.
3941
- 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.
4042
- 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

Comments
 (0)