Skip to content

[JS API] Temporal #169

Closed
Closed

Description

@legowerewolf

Description

Temporal seeks to solve problems with the existing JS Date APIs, namely:

  1. No support for time zones other than the user’s local time and UTC
  2. Parser behavior so unreliable it is unusable
  3. Date object is mutable
  4. DST behavior is unpredictable
  5. Computation APIs are unwieldy
  6. No support for non-Gregorian calendars

https://maggiepint.com/2017/04/09/fixing-javascript-date-getting-started/

Rationale

The proliferation of date-and-time handling libraries should be sufficient evidence that the current state of built-in datetime handling APIs is not up to snuff.

Specification

https://github.com/tc39/proposal-temporal

Tests

https://test262.report/browse/built-ins/Temporal (thanks @foolip)

Activity

  1. foolip commented on Sep 30, 2022

    @foolip
    Member

    Looks like there are tests for this here:
    https://test262.report/browse/built-ins/Temporal

    Looking at https://github.com/tc39/test262/commits/main/test/built-ins/Temporal, it looks like the test are mostly written by @Ms2ger @ptomato @FrankYFTang @jugglinmike. Perhaps they have feedback on whether this test suite is ready, and if the spec for Temporal is ready (enough).

  2. Ms2ger commented on Sep 30, 2022

    @Ms2ger

    Initial implementations are ongoing and still turning up spec issues. I believe we're still aiming for stage 4 by the end of the year, and we're building up the test suite. I'm not sure if it would be useful to include in interop23, but it seems plausible that spec and tests will be in reasonable shape by next year.

  3. added this to the milestone on Sep 30, 2022
  4. foolip commented on Sep 30, 2022

    @foolip
    Member

    @Ms2ger would you advise against including it, or are you not sure, as you say?

  5. Ms2ger commented on Sep 30, 2022

    @Ms2ger

    I have no strong feelings one way or the other

  6. syg commented on Sep 30, 2022

    @syg

    I believe we're still aiming for stage 4 by the end of the year

    Stage 4 for Temporal by EOY 2022 isn't possible, do you mean EOY 2023?

  7. moved this to Proposed in Interop 2023on Oct 7, 2022
  8. removed this from the milestone on Oct 7, 2022
  9. foolip commented on Oct 10, 2022

    @foolip
    Member

    Regarding the spec maturity, in the proposal template we only ask for Stage 2+ for TC39, and Temporal is currently Stage 3. Of course that doesn't by itself mean that implementers feel it's ready to ship in 2023, we'll use the proposal selection process to determine by consensus what to include and not.

  10. tbondwilkinson commented on Oct 24, 2022

    @tbondwilkinson

    Temporal is a P1 interop project for Google's closure library.

    "Provides a path off of goog.date and Date, which are problematic APIs for numerous reasons (primarily mutability and lack of features)."

  11. foolip commented on Nov 11, 2022

    @foolip
    Member

    In the MDN short survey on APIs & JavaScript, "Temporal API" was selected by ~18% of survey takers, putting it in the middle third of options. (There is some uncertainty as with any survey data.)

  12. nairnandu commented on Feb 1, 2023

    @nairnandu
    Contributor

    Thank you for proposing Temporal for inclusion in Interop 2023.

    We wanted to let you know that this proposal was not selected to be part of Interop this year. The specification is still evolving, and integrating the test suite into WPT would be a significant undertaking. This should not be taken as a comment on the technology as a whole, and resubmitting a proposal for this feature as part of a future round of Interop would be welcome.

    For an overview of our process, see the proposal selection summary. Thank you again for contributing to Interop 2023!

    Posted on behalf of the Interop team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    focus-area-proposal

    Type

    No type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions