diff --git a/spec.html b/spec.html index 88e9fa708c..9e7b28f808 100644 --- a/spec.html +++ b/spec.html @@ -26482,10 +26482,15 @@

Overview of Date Objects and Definitions of Abstract Operations

Time Values and Time Range

-

A Date object contains a Number indicating a particular instant in time to within a millisecond. Such a Number is called a time value. A time value may also be *NaN*, indicating that the Date object does not represent a specific instant of time.

-

Time is measured in ECMAScript in milliseconds since 01 January, 1970 UTC. In time values leap seconds are ignored. It is assumed that there are exactly 86,400,000 milliseconds per day. ECMAScript Number values can represent all integers from -9,007,199,254,740,992 to 9,007,199,254,740,992; this range suffices to measure times to millisecond precision for any instant that is within approximately 285,616 years, either forward or backward, from 01 January, 1970 UTC.

-

The actual range of times supported by ECMAScript Date objects is slightly smaller: exactly -100,000,000 days to 100,000,000 days measured relative to midnight at the beginning of 01 January, 1970 UTC. This gives a range of 8,640,000,000,000,000 milliseconds to either side of 01 January, 1970 UTC.

-

The exact moment of midnight at the beginning of 01 January, 1970 UTC is represented by the value *+0*.

+

A Date object contains a Number representing an instant in time with millisecond precision. Such a Number is called a time value. A time value may also be *NaN*, indicating that the Date object does not represent a specific instant in time.

+

Time is measured in ECMAScript as milliseconds since midnight at the beginning of 01 January, 1970 UTC. Time in ECMAScript does not observe leap seconds; they are ignored. Time calculations assume each and every day contains exactly 60 × 60 × 24 × 1000 = 86,400,000 milliseconds, to align with the POSIX specification of each and every day containing exactly 86,400 seconds.

+

A Number can exactly represent all integers from -9,007,199,254,740,992 to 9,007,199,254,740,992 ( and ). A time value supports a slightly smaller range of exactly -100,000,000 days to 100,000,000 days measured relative to midnight at the beginning of 01 January, 1970 UTC. This yields an exact supported time value range of -8,640,000,000,000,000 to 8,640,000,000,000,000 milliseconds relative to midnight at the beginning of 01 January, 1970 UTC.

+

The exact moment of midnight at the beginning of 01 January, 1970 UTC is represented by the time value *+0*.

+ +

The 400 year cycle of the Gregorian calendar contains 97 leap years. This yields an average of 365.2425 days per year, or an average of 31,556,952,000 milliseconds per year under the Gregorian calendar. ECMAScript applies a proleptic Gregorian calendar for all time computations.

+

As specified by this section, the maximum year range a Number can represent exactly with millisecond precision is approximately -285,426 to 285,426 years relative to midnight at the beginning of 01 January, 1970 UTC.

+

As specified by this section, the maximum year range a time value can represent is approximately -273,790 to 273,790 years relative to midnight at the beginning of 01 January, 1970 UTC.

+
@@ -26802,15 +26807,15 @@

Date Time String Format

Extended Years

-

ECMAScript requires the ability to specify 6 digit years (extended years); approximately 285,426 years, either forward or backward, from 01 January, 1970 UTC. To represent years before 0 or after 9999, ISO 8601 permits the expansion of the year representation, but only by prior agreement between the sender and the receiver. In the simplified ECMAScript format such an expanded year representation shall have 2 extra year digits and is always prefixed with a + or - sign. The year 0 is considered positive and hence prefixed with a + sign.

+

ECMAScript requires the ability to specify 6 digit years, or extended years, to render the full range of a time value; -100,000,000 days to 100,000,000 days, or approximately -273,790 to 273,790 years, relative to midnight at the beginning of 01 January, 1970 UTC (). To represent years before 0 or after 9999, ISO 8601 permits the expansion of the year representation, but only by prior agreement between the sender and the receiver. In the simplified ECMAScript format such an expanded year representation shall have 2 extra year digits and is always prefixed with a + or - sign. The year 0 is considered positive and hence prefixed with a + sign. ISO 8601 formatted strings with extended years representing points in time outside the range of a time value are represented as the Number *NaN* when parsed by `Date.parse()` and do not fall back to implementation-specific behavior or heuristics.

Examples of extended years:

- - + + @@ -26833,8 +26838,8 @@

Extended Years

- - + +
-283457-03-21T15:00:59.008Z283458 B.C.-271821-04-20T00:00:00Z271822 B.C.
-000001-01-01T00:00:00Z 2009 A.D.
+287396-10-12T08:59:00.992Z287396 A.D.+275760-09-13T00:00:00Z275760 A.D.