archives

« Bugzilla Issues Index

#280 — Date ranges in [15.9.1.15.1 Extended years] are invalid


First sentence in [15.9.1.15.1 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.
---

The date range "approx. 285,426 years" is
1. inconsistent with [15.9.1.1 Time Values and Time Range]
2. and actually wrong (or least wrongly worded).


Concerning 1)
In [15.9.1.1 Time Values and Time Range], the theoretical date range is given as "appr. 285,616 years" which can be easily recalculated given the size of a double precision floating point number. The "285,426" number in [15.9.1.1] is slightly lower, I guess due to additional leap year calculation.
For an approximation "285,616" seems to be the better choice. But at least the numbers should be consistent within the specification.

Concerning 2)
ECMAScript does not require to specify "approx. 285,426 years" but instead only requires from implementations to support ±100,000,000 days from midnight 01/01/1970. So the theoretical limit of double precision floating point numbers shouldn't actually appear in [15.9.1.15.1], instead the actual range ±100,000,000 days should be used. That also means the "Examples of extended years" part needs to be updated to use date values which are actually supported.