Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Provides standard objects and functions for working with dates and times.

License

NotificationsYou must be signed in to change notification settings

tc39/proposal-temporal

Repository files navigation

Provides standard objects and functions for working with dates and times.

Status

This proposal is currentlyStage 3 and was reviewed for Stage 3 by Richard Gibson, Bradley Farias, and Daniel Ehrenberg.

This proposal is now in the hands of ECMAScript engine implementers, so the bar for making API changes is extremely high.Nonetheless, changes may occur as the result of feedback from implementation in JS engines.Editorial changes to the spec and bug fixes to the spec, tests, and docs are also ongoing, as is customary for Stage 3 proposals.Additional tests and documentation content are also being added during Stage 3.

Champions

Overview / Motivation

Date has been a long-standing pain point in ECMAScript.This proposesTemporal, a globalObject that acts as a top-level namespace (likeMath), that brings a modern date/time API to the ECMAScript language.For a detailed breakdown of motivations, see:Fixing JavaScript Date

Principles:

  • All Temporal objects are immutable.
  • Date values can be represented in local calendar systems (why?), but they should be convertable to and from theProleptic Gregorian Calendar.
  • All time-of-day values are based on a standard 24-hour clock.
  • Leap seconds are not represented.

Specification Text

The specification text can be foundhere.

Documentation

Reference documentation and examples can be found below.

A cookbook to help you get started and learn the ins and outs of Temporal is availablehere

Polyfills

PolyfillRepoStatus
@js-temporal/polyfilljs-temporal/temporal-polyfillAlpha release available
temporal-polyfillfullcalendar/temporal-polyfillBeta release available

If you're working on a polyfill, please file an issue or PR so we can add yours here.

Anon-production polyfill was built to validate this proposal.This polyfill continues to live in this repo, but only for the purposes of running tests and powering the documentation "playground" as described below.

DO NOT use this polyfill in your own projects!Instead, please use a polyfill from the table above.

Documentation Playground

When viewing thereference documentation, the non-production polyfill is automatically loaded in your browser, so you can try out Temporal by opening your browser's developer tools console.


[8]ページ先頭

©2009-2025 Movatter.jp