Update Temporal implementation to draft November 1, 2024
Categories
(Core :: JavaScript: Standard Library, task, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox135 | --- | fixed |
People
(Reporter: anba, Assigned: anba)
References
(Blocks 1 open bug)
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•1 year ago
|
| Assignee | ||
Comment 1•1 year ago
|
||
| Assignee | ||
Comment 2•1 year ago
|
||
| Assignee | ||
Comment 3•1 year ago
|
||
- Update spec references to match the current spec text more closely.
- Use
MOZ_TRY_VARto reduce code duplication. - Add
ParsedZonedDateTimeto reduce the number of out-params for
ParseTemporalZonedDateTimeStringandParseTemporalRelativeToString. - Also track "start-of-day" in preparation for the next part.
| Assignee | ||
Comment 4•1 year ago
|
||
| Assignee | ||
Comment 5•1 year ago
|
||
- Remove precalculated date-time parameters from
AddZonedDateTimeandDifferenceZonedDateTimeWithRounding. - Rename
GetPlainDateTimeFortoGetISODateTimeForper current spec. - Inline
GetOffsetStringForinto its single caller per current spec.
| Assignee | ||
Comment 6•1 year ago
|
||
The options parameter is now (again) handled in the various ToTemporalThing
operations.
Also merge ToTemporalDuration and ToTemporalDurationRecord per latest spec.
| Assignee | ||
Comment 7•1 year 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•1 year ago
|
||
The spec now has a separate ISODateWithinLimits operation.
| Assignee | ||
Comment 9•1 year ago
|
||
Spec operations have been renamed to all start with "AddDurationTo" and there
were some additional minor implementation changes.
- Change
AddTime,BalanceTime, andRoundTimeto return aTimeRecord(per spec). - New callers to
AddTimeandBalanceTimerequireint64_tfordays, so using
int64_tfor all three functions is now necessary. - The new TODO notes in
AddDurationToYearMonthwill be addressed when updating
the Temporal Fields operations.
| Assignee | ||
Comment 10•1 year ago
|
||
| Assignee | ||
Comment 11•1 year ago
|
||
- Sync step comments.
- Reorder steps to match current proposal.
- Add TODO notes for still missing changes.
| Assignee | ||
Comment 12•1 year ago
|
||
Drive-by changes:
- Make the
MonthCodesconstructor a bit more readable. - Change constants in
monthcodesnamespace to avoid a parser error in the CDT indexer.
| Assignee | ||
Comment 13•1 year 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•1 year ago
|
||
| Assignee | ||
Comment 15•1 year ago
|
||
| Assignee | ||
Comment 16•1 year ago
|
||
| Assignee | ||
Comment 17•1 year 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•1 year 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•1 year 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•1 year ago
|
||
| Assignee | ||
Comment 21•1 year 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•1 year ago
|
||
| Assignee | ||
Comment 23•1 year ago
|
||
Sync all operations and step references to the current draft proposal.
| Assignee | ||
Comment 24•1 year ago
|
||
options are now processed before the early return.
Drive-by changes:
- Update names for
CompareTimeDuration,TimeDurationSign, andDateDurationDays. - Pass
ZonedDateTimetoAddZonedDateTimeandDifferenceZonedDateTimeWithRounding
instead of reading the individual fields in the callers.
| Assignee | ||
Comment 25•1 year ago
|
||
| Assignee | ||
Comment 26•1 year ago
|
||
| Assignee | ||
Comment 27•1 year ago
|
||
| Assignee | ||
Comment 28•1 year ago
|
||
Sync all operations and step references to the current draft proposal.
| Assignee | ||
Comment 29•1 year ago
|
||
This allows removing SortedEnumSet.
| Assignee | ||
Comment 30•1 year ago
|
||
Perform the following renames:
PlainDate(Time)->ISODate(Time)PlainTime->TimePlainXXXWithCalendar->PlainXXX.
| Assignee | ||
Comment 31•1 year ago
|
||
Sync all operations and step references to the current draft proposal.
| Assignee | ||
Comment 32•1 year 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•1 year 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•1 year ago
|
||
Align duration records with the current spec names.
| Assignee | ||
Comment 35•1 year ago
|
||
Implement the changes from:
| Assignee | ||
Comment 36•1 year ago
|
||
Rounding operations were reordered and split into different operations. Update
everything to match the current spec text.
| Assignee | ||
Comment 37•1 year ago
|
||
Sync all operations and step references to the current draft proposal.
| Assignee | ||
Comment 38•1 year ago
|
||
Rename ToTemporalCalendarIdentifier to CalendarIdentifier to avoid confusion
with the spec operation ToTemporalCalendarIdentifier.
| Assignee | ||
Comment 39•1 year ago
|
||
| Assignee | ||
Comment 40•1 year ago
|
||
Sync all operations and step references to the current draft proposal.
| Assignee | ||
Comment 41•1 year ago
|
||
| Assignee | ||
Comment 42•1 year ago
|
||
Sync all operations and step references to the current draft proposal.
| Assignee | ||
Comment 43•1 year ago
|
||
Sync all operations and step references to the current draft proposal.
| Assignee | ||
Comment 44•1 year ago
|
||
ICU4X doesn't yet provide this operation, so we have to write our own implementation.
| Assignee | ||
Comment 45•1 year ago
|
||
Workaround for https://github.com/unicode-org/icu4x/issues/5070.
| Assignee | ||
Comment 46•1 year ago
|
||
ICU4X doesn't yet provide a public API for this operation, so we have to write
our own implementation.
| Assignee | ||
Comment 47•1 year ago
|
||
Comment 48•1 year ago
|
||
Comment 49•1 year ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/adaacc03dc4f
https://hg.mozilla.org/mozilla-central/rev/b6f30453153e
https://hg.mozilla.org/mozilla-central/rev/ee257f72e4c3
https://hg.mozilla.org/mozilla-central/rev/93b34d6de713
https://hg.mozilla.org/mozilla-central/rev/63c3e38aa87a
https://hg.mozilla.org/mozilla-central/rev/6ef814f5cfef
https://hg.mozilla.org/mozilla-central/rev/21548a9ebb44
https://hg.mozilla.org/mozilla-central/rev/0b9705544e7b
https://hg.mozilla.org/mozilla-central/rev/10a3237bfe6b
https://hg.mozilla.org/mozilla-central/rev/2c0dd60a07fe
https://hg.mozilla.org/mozilla-central/rev/15302cb66051
https://hg.mozilla.org/mozilla-central/rev/347f3afc24e7
https://hg.mozilla.org/mozilla-central/rev/a65d72c20c3a
https://hg.mozilla.org/mozilla-central/rev/0a8562654882
https://hg.mozilla.org/mozilla-central/rev/36a71a646110
https://hg.mozilla.org/mozilla-central/rev/efb3a6becd0f
https://hg.mozilla.org/mozilla-central/rev/7c84fde489b3
https://hg.mozilla.org/mozilla-central/rev/e9dd7a737ebe
https://hg.mozilla.org/mozilla-central/rev/fd8642b60cc7
https://hg.mozilla.org/mozilla-central/rev/e12cbfccea67
| Assignee | ||
Updated•1 year ago
|
Comment 50•1 year ago
|
||
Updated•1 year ago
|
Comment 51•1 year ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/e9325daae0f5
https://hg.mozilla.org/mozilla-central/rev/c86264931c4e
https://hg.mozilla.org/mozilla-central/rev/45e0b5d06822
https://hg.mozilla.org/mozilla-central/rev/4c168e3eae7e
https://hg.mozilla.org/mozilla-central/rev/662a3d98914c
https://hg.mozilla.org/mozilla-central/rev/3a9ba9dcd768
https://hg.mozilla.org/mozilla-central/rev/26674a6896f7
https://hg.mozilla.org/mozilla-central/rev/02748035a5d4
https://hg.mozilla.org/mozilla-central/rev/b2bb14a8a765
https://hg.mozilla.org/mozilla-central/rev/ba5312b0d8ff
https://hg.mozilla.org/mozilla-central/rev/5e93026f1b64
https://hg.mozilla.org/mozilla-central/rev/a547264ae9d4
https://hg.mozilla.org/mozilla-central/rev/d3f981765985
https://hg.mozilla.org/mozilla-central/rev/753aca5e850b
https://hg.mozilla.org/mozilla-central/rev/3331f8cdae9e
https://hg.mozilla.org/mozilla-central/rev/09da4ae15d17
https://hg.mozilla.org/mozilla-central/rev/8d23aba37625
https://hg.mozilla.org/mozilla-central/rev/8e190ff19827
https://hg.mozilla.org/mozilla-central/rev/e38748470789
https://hg.mozilla.org/mozilla-central/rev/a8c8e9236d34
https://hg.mozilla.org/mozilla-central/rev/e5a77786ab80
https://hg.mozilla.org/mozilla-central/rev/7f9a3a237161
https://hg.mozilla.org/mozilla-central/rev/4f245b22d1fd
https://hg.mozilla.org/mozilla-central/rev/9f26e0e34338
https://hg.mozilla.org/mozilla-central/rev/41c6654d35f1
https://hg.mozilla.org/mozilla-central/rev/9260b23b9b9c
https://hg.mozilla.org/mozilla-central/rev/db051ac54c32
Description
•