Update Temporal implementation to draft November 1, 2024
Categories
(Core :: JavaScript: Standard Library, task, P3)
Tracking
()
People
(Reporter: anba, Assigned: anba)
References
(Blocks 2 open bugs)
Details
Attachments
(47 files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
Updated•27 days ago
|
Assignee | ||
Comment 1•27 days ago
|
||
Assignee | ||
Comment 2•27 days ago
|
||
Assignee | ||
Comment 3•27 days ago
|
||
- Update spec references to match the current spec text more closely.
- Use
MOZ_TRY_VAR
to reduce code duplication. - Add
ParsedZonedDateTime
to reduce the number of out-params for
ParseTemporalZonedDateTimeString
andParseTemporalRelativeToString
. - Also track "start-of-day" in preparation for the next part.
Assignee | ||
Comment 4•27 days ago
|
||
Assignee | ||
Comment 5•27 days ago
|
||
- Remove precalculated date-time parameters from
AddZonedDateTime
andDifferenceZonedDateTimeWithRounding
. - Rename
GetPlainDateTimeFor
toGetISODateTimeFor
per current spec. - Inline
GetOffsetStringFor
into its single caller per current spec.
Assignee | ||
Comment 6•27 days ago
|
||
The options
parameter is now (again) handled in the various ToTemporalThing
operations.
Also merge ToTemporalDuration
and ToTemporalDurationRecord
per latest spec.
Assignee | ||
Comment 7•27 days ago
|
||
Sync the operation names and add two new operations
NormalizeDurationWith24HourDays
and NormalizeDurationWithoutTime
.
NOTE: Later spec updates have renamed these operations. Later parts in this
patch stack will update the operations to their current names.
Assignee | ||
Comment 8•27 days ago
|
||
The spec now has a separate ISODateWithinLimits
operation.
Assignee | ||
Comment 9•27 days ago
|
||
Spec operations have been renamed to all start with "AddDurationTo" and there
were some additional minor implementation changes.
- Change
AddTime
,BalanceTime
, andRoundTime
to return aTimeRecord
(per spec). - New callers to
AddTime
andBalanceTime
requireint64_t
fordays
, so using
int64_t
for all three functions is now necessary. - The new TODO notes in
AddDurationToYearMonth
will be addressed when updating
the Temporal Fields operations.
Assignee | ||
Comment 10•27 days ago
|
||
Assignee | ||
Comment 11•27 days ago
|
||
- Sync step comments.
- Reorder steps to match current proposal.
- Add TODO notes for still missing changes.
Assignee | ||
Comment 12•27 days ago
|
||
Drive-by changes:
- Make the
MonthCodes
constructor a bit more readable. - Change constants in
monthcodes
namespace to avoid a parser error in the CDT indexer.
Assignee | ||
Comment 13•27 days ago
|
||
"Temporal Fields" are now "Calendar Fields" in the spec. Multiple operations
have been simplified now that user-defined calendars have been removed. Sync
all operations which use "Calendar Fields" to match the current spec text.
Assignee | ||
Comment 14•27 days ago
|
||
Assignee | ||
Comment 15•27 days ago
|
||
Assignee | ||
Comment 16•27 days ago
|
||
Assignee | ||
Comment 17•27 days ago
|
||
Changes from:
- https://github.com/tc39/proposal-temporal/commit/805b4adbb76b8001aeb761b21f05defca0272cc5
- https://github.com/tc39/proposal-temporal/commit/0497ce3a7d3c64a07493d1a20920ccae5726b13d
- https://github.com/tc39/proposal-temporal/commit/2ecbec67efc8b8bd31098201d459349c398386f0
- https://github.com/tc39/proposal-temporal/commit/f59e41ff9d135de0a22fe408f70cffe68e2a243d
- https://github.com/tc39/proposal-temporal/commit/283cd63d51f1ddc68b1029568451ed88c9e495c6
- https://github.com/tc39/proposal-temporal/commit/a820980cf7a970bc462cc8c1c85ab71aa66ecb30
- https://github.com/tc39/proposal-temporal/commit/10f967c6ec9446c412a411e04046d320dcf825a4
Assignee | ||
Comment 18•27 days ago
|
||
Changes from:
- https://github.com/tc39/proposal-temporal/commit/3685b60d70a4c021398e93138dd649c36303dc29
- https://github.com/tc39/proposal-temporal/commit/487d272cf2f6e25201783982596da3f9fa6357b0
- https://github.com/tc39/proposal-temporal/commit/8f903388cb23b2635201ead261d15e99c429e14b
- https://github.com/tc39/proposal-temporal/commit/5a1fcc3ac9a0923065ee6af5ec733ceb7457bffa
- https://github.com/tc39/proposal-temporal/commit/f3997ebab3e5ecfd018167337f14d48a924fdb55
- https://github.com/tc39/proposal-temporal/commit/0406eb1342197aa51385e9dde8d657ac577c5a63
- https://github.com/tc39/proposal-temporal/commit/444ec937cca777c2225132df6ff5d860da66bb72
- https://github.com/tc39/proposal-temporal/commit/1d4d62e33cc276957072b53fecec365d83aec3e2
- https://github.com/tc39/proposal-temporal/commit/da5b3c02db2d36e5e91b84d27de829658620fe64
Assignee | ||
Comment 19•27 days ago
|
||
Changes from:
- https://github.com/tc39/proposal-temporal/commit/54f153374a1e885af3139ebf37b4b70c5a1a69c4
- https://github.com/tc39/proposal-temporal/commit/ae86a91b4c900cc9a3124874189620883359270e
- https://github.com/tc39/proposal-temporal/commit/2eb79f1dbd6837a136457e81d0c827d6d7464502
- https://github.com/tc39/proposal-temporal/commit/3374959b9acb5e361af6cfca0c3f8bde0f40dfaf
Assignee | ||
Comment 20•27 days ago
|
||
Assignee | ||
Comment 21•27 days ago
|
||
We don't have to use Int128
, because without user-defined time zones, it's guaranteed
that the values fit into int64_t
.
Assignee | ||
Comment 22•27 days ago
|
||
Assignee | ||
Comment 23•27 days ago
|
||
Sync all operations and step references to the current draft proposal.
Assignee | ||
Comment 24•27 days ago
|
||
options
are now processed before the early return.
Drive-by changes:
- Update names for
CompareTimeDuration
,TimeDurationSign
, andDateDurationDays
. - Pass
ZonedDateTime
toAddZonedDateTime
andDifferenceZonedDateTimeWithRounding
instead of reading the individual fields in the callers.
Assignee | ||
Comment 25•27 days ago
|
||
Assignee | ||
Comment 26•27 days ago
|
||
Assignee | ||
Comment 27•27 days ago
|
||
Assignee | ||
Comment 28•27 days ago
|
||
Sync all operations and step references to the current draft proposal.
Assignee | ||
Comment 29•27 days ago
|
||
This allows removing SortedEnumSet
.
Assignee | ||
Comment 30•27 days ago
|
||
Perform the following renames:
PlainDate(Time)
->ISODate(Time)
PlainTime
->Time
PlainXXXWithCalendar
->PlainXXX
.
Assignee | ||
Comment 31•27 days ago
|
||
Sync all operations and step references to the current draft proposal.
Assignee | ||
Comment 32•27 days ago
|
||
The spec no longer passes Temporal.Instant
objects around and instead directly
uses the nanoseconds amount. Rename the Instant
struct to EpochNanoseconds
to
match the current spec use more closely.
Assignee | ||
Comment 33•27 days ago
|
||
The spec now also defines a Time Duration
value, so it's confusing when an
internal implementation type is named TimeDuration
.
Assignee | ||
Comment 34•27 days ago
|
||
Align duration records with the current spec names.
Assignee | ||
Comment 35•27 days ago
|
||
Implement the changes from:
Assignee | ||
Comment 36•27 days ago
|
||
Rounding operations were reordered and split into different operations. Update
everything to match the current spec text.
Assignee | ||
Comment 37•27 days ago
|
||
Sync all operations and step references to the current draft proposal.
Assignee | ||
Comment 38•27 days ago
|
||
Rename ToTemporalCalendarIdentifier
to CalendarIdentifier
to avoid confusion
with the spec operation ToTemporalCalendarIdentifier
.
Assignee | ||
Comment 39•27 days ago
|
||
Assignee | ||
Comment 40•27 days ago
|
||
Sync all operations and step references to the current draft proposal.
Assignee | ||
Comment 41•27 days ago
|
||
Assignee | ||
Comment 42•27 days ago
|
||
Sync all operations and step references to the current draft proposal.
Assignee | ||
Comment 43•27 days ago
|
||
Sync all operations and step references to the current draft proposal.
Assignee | ||
Comment 44•27 days ago
|
||
ICU4X doesn't yet provide this operation, so we have to write our own implementation.
Assignee | ||
Comment 45•27 days ago
|
||
Workaround for https://github.com/unicode-org/icu4x/issues/5070.
Assignee | ||
Comment 46•27 days ago
|
||
ICU4X doesn't yet provide a public API for this operation, so we have to write
our own implementation.
Assignee | ||
Comment 47•27 days ago
|
||
Comment 48•7 hours ago
|
||
Description
•