[Temporal] Add toJSON, toString, and non-intl toLocaleString to Instant
Also add AOs: FormatISOTimeZoneOffsetString, TemporalInstantToString, GetUnsignedRoundingMode, ApplyUnsignedRoundingMode, RoundTemporalInstant Also update the RoundNumberToIncrement implementation and a BigInt version. Fix the test setup in test/mjsunit/temporal/instant-to-json.js since fromEpochSeconds and fromEpochMilliseconds do not take BigInt Spec Text: https://tc39.es/proposal-temporal/#sec-temporal.instant.prototype.tojson https://tc39.es/proposal-temporal/#sec-temporal.instant.prototype.tolocalestring https://tc39.es/proposal-temporal/#sec-temporal.instant.prototype.tostring https://tc39.es/proposal-temporal/#sec-temporal-temporalinstanttostring https://tc39.es/proposal-temporal/#sec-temporal-formatisotimezoneoffsetstring https://tc39.es/proposal-temporal/#sec-temporal-getunsignedroundingmode https://tc39.es/proposal-temporal/#sec-temporal-applyunsignedroundingmode https://tc39.es/proposal-temporal/#sec-temporal-roundtemporalinstant https://tc39.es/proposal-temporal/#sec-temporal-roundnumbertoincrement This does NOT implement the intl version of toLocaleString specified in (notice the "sup" not "sec" after #) yet. https://tc39.es/proposal-temporal/#sup-temporal.instant.prototype.tolocalestring Bug: v8:11544 Change-Id: I807afd5bf550d2a65a4732a8e536056eea79cf8f Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3696483 Commit-Queue: Frank Tang <ftang@chromium.org> Reviewed-by: Adam Klein <adamk@chromium.org> Cr-Commit-Position: refs/heads/main@{#81428}
Showing
This diff is collapsed.
Please
register
or
sign in
to comment