Open Bug 1519167 Opened 4 years ago Updated 2 months ago

Implement the Temporal proposal


(Core :: JavaScript Engine, enhancement, P3)

63 Branch





(Reporter: alex.fdm, Assigned: anba)


(Blocks 2 open bugs, )


(Keywords: dev-doc-needed)


(7 files)

The proposal is currently in Stage 2.

Priority: -- → P3

Taking for now because I've already written some code.

Assignee: nobody → andrebargull

Proposal now in Stage 3.

This is currently blocked from shipping unflagged on IETF Standardization work:

FWIW, I have a local prototype which includes everything from the current proposal apart from and Unsurprisingly a proposal as large as Temporal has numerous issues, I've already filed some at, but in the meantime I've found more issues. (There are more than 350 FIXME and TODO annotations referring to spec issues in that prototype.) My current plan is to wait until the spec authors have addressed this feedback before I'll upload the patches for review, because I don't think it makes sense to spend time reviewing code which is still so volatile. And waiting a bit longer gives me additional time to clean-up the code, add comments, etc. :-)

In its current form, without any optimisations or overly large comments except spec-step comments, the number of lines already exceeds "builtin/intl", so reviewers will have their, err..., fun! :-)

~/hg/mozilla-inbound$ LANG=C wc -l js/src/builtin/temporal/*
  2819 js/src/builtin/temporal/Calendar.cpp
   149 js/src/builtin/temporal/Calendar.h
  5500 js/src/builtin/temporal/Duration.cpp
   107 js/src/builtin/temporal/Duration.h
  2006 js/src/builtin/temporal/Instant.cpp
    80 js/src/builtin/temporal/Instant.h
    35 js/src/builtin/temporal/
  2419 js/src/builtin/temporal/PlainDate.cpp
    85 js/src/builtin/temporal/PlainDate.h
  2940 js/src/builtin/temporal/PlainDateTime.cpp
   110 js/src/builtin/temporal/PlainDateTime.h
  1174 js/src/builtin/temporal/PlainMonthDay.cpp
    58 js/src/builtin/temporal/PlainMonthDay.h
  2277 js/src/builtin/temporal/PlainTime.cpp
    84 js/src/builtin/temporal/PlainTime.h
  1943 js/src/builtin/temporal/PlainYearMonth.cpp
    59 js/src/builtin/temporal/PlainYearMonth.h
  2558 js/src/builtin/temporal/Temporal.cpp
   334 js/src/builtin/temporal/Temporal.h
   494 js/src/builtin/temporal/TemporalNow.cpp
    31 js/src/builtin/temporal/TemporalNow.h
  2584 js/src/builtin/temporal/TemporalParser.cpp
    61 js/src/builtin/temporal/TemporalParser.h
    76 js/src/builtin/temporal/TemporalTypes.h
    67 js/src/builtin/temporal/TemporalTypes-inl.h
  1912 js/src/builtin/temporal/TimeZone.cpp
    96 js/src/builtin/temporal/TimeZone.h
    22 js/src/builtin/temporal/Wrapped.cpp
   183 js/src/builtin/temporal/Wrapped.h
  3902 js/src/builtin/temporal/ZonedDateTime.cpp
   131 js/src/builtin/temporal/ZonedDateTime.h
 34296 total

Wow, amazing stuff. Can't wait to review ;) maybe we can have a couple of us do it..

Depends on D124224

Depends on D124225

Depends on D124226

This is the current prototype, not yet ready for review. There is currently one large patch which covers the whole proposal, for review it will be split into smaller, reviewable parts. The --with-temporal-api flag must be set in the "mozconfig" resp. passed to configure to enable the Temporal code.

Blocks: 1732145
Blocks: 1648139

Temporal.TimeZone needs these additional methods.

Attachment #9238976 - Attachment description: WIP: Bug 1519167 - Part 1: Add config for Temporal. → WIP: Bug 1519167 - Part 2: Add config for Temporal.
Attachment #9238977 - Attachment description: WIP: Bug 1519167 - Part 2: Add source files. → WIP: Bug 1519167 - Part 3: Add source files.
Attachment #9238978 - Attachment description: WIP: Bug 1519167 - Part 3: Add Temporal object. → WIP: Bug 1519167 - Part 4: Add Temporal object.
Attachment #9238979 - Attachment description: WIP: Bug 1519167 - Part 4: Tests. → WIP: Bug 1519167 - Part 6: Temporal tests.

Depends on D124227

No longer blocks: 1648139
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.