You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MakeDate can return NaN for large year values, because MakeDay has wishy-washy definition when NaN can be returned for large values:
[...], but if this is not possible (because some argument is out of range), return NaN.
There are multiple MakeDay, MakeDate, and TimeFromYear callers which simply assert the returned value is finite, but this may not be true in practice. For example consider calling GetEpochFromISOParts with GetEpochFromISOParts(Number.MAX_VALUE, 1, 1, 0, 0, 0, 0, 0, 0).
From #1502:
There are multiple
MakeDay
,MakeDate
, andTimeFromYear
callers which simply assert the returned value is finite, but this may not be true in practice. For example consider calling GetEpochFromISOParts withGetEpochFromISOParts(Number.MAX_VALUE, 1, 1, 0, 0, 0, 0, 0, 0)
.Also see: tc39/ecma262#1087 and tc39/ecma262#1564
The text was updated successfully, but these errors were encountered: