ECMAScript 2023 & Temporal All In One
ES14 / ES2023
ES2015 => ES6
...
ES2022 => ES13
ES2023 => ES14
Temporal
ES2023 / ES14
This Stage 3 proposal is experimental.
Date
has been a long-standing pain point in ECMAScript.
This is a proposal for Temporal
, a global Object
that acts as a top-level namespace
(like Math), that brings a modern date/time
API to the ECMAScript language.
For a detailed look at some of the problems with Date, and the motivations for Temporal, see: Fixing JavaScript Date.
Temporal fixes these problems by:
Providing easy-to-use APIs for date and time computations
First-class support for all time zones, including DST-safe arithmetic
Dealing only with objects representing fixed dates and times
Parsing a strictly specified string format
Supporting non-Gregorian calendars
Temporal provides separate ECMAScript classes for date-only, time-only, and other scoped use cases.
This makes code more readable and prevents bugs caused by incorrectly assuming 0, UTC, or the local time zone for values that are actually unknown.
https://tc39.es/proposal-temporal/docs/
https://github.com/tc39/proposal-temporal
refs
https://plainenglish.io/blog/latest-es13-javascript-features
https://codingbeautydev.com/blog/es13-javascript-features/
https://www.w3schools.io/javascript/es13-features/
©xgqfrms 2012-2021
www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!
原创文章,版权所有©️xgqfrms, 禁止转载
标签:2022,Temporal,ECMAScript,https,time,es13,com From: https://www.cnblogs.com/xgqfrms/p/16927831.html