diff --git a/docs/plaindate.md b/docs/plaindate.md index 6185dba01..09854b97c 100644 --- a/docs/plaindate.md +++ b/docs/plaindate.md @@ -81,8 +81,8 @@ If the string isn't valid according to ISO 8601, then a `RangeError` will be thr The `overflow` option works as follows, if `item` is an object: -- In `constrain` mode (the default), any out-of-range values are clamped to the nearest in-range value. -- In `reject` mode, the presence of out-of-range values will cause the function to throw a `RangeError`. +- In `constrain` mode (the default), any out-of-range values are clamped to the nearest in-range value (after assuming extension of eras over arbitrary years to substitute `era` and `eraYear` with appropriate values for the `item`). +- In `reject` mode, the presence of out-of-range values (after assuming extension of eras over arbitrary years to substitute `era` and `eraYear` with appropriate values for the `item`) will cause the function to throw a `RangeError`. The `overflow` option is ignored if `item` is a string. diff --git a/docs/plaindatetime.md b/docs/plaindatetime.md index d3f4b180e..24b9ba4fa 100644 --- a/docs/plaindatetime.md +++ b/docs/plaindatetime.md @@ -112,8 +112,8 @@ If the string isn't valid according to ISO 8601, then a `RangeError` will be thr The `overflow` option works as follows, if `item` is an object: -- In `constrain` mode (the default), any out-of-range values are clamped to the nearest in-range value. -- In `reject` mode, the presence of out-of-range values will cause the function to throw a `RangeError`. +- In `constrain` mode (the default), any out-of-range values are clamped to the nearest in-range value (after assuming extension of eras over arbitrary years to substitute `era` and `eraYear` with appropriate values for the `item`). +- In `reject` mode, the presence of out-of-range values (after assuming extension of eras over arbitrary years to substitute `era` and `eraYear` with appropriate values for the `item`) will cause the function to throw a `RangeError`. The `overflow` option is ignored if `item` is a string. diff --git a/docs/plainyearmonth.md b/docs/plainyearmonth.md index 493005e86..521f26e39 100644 --- a/docs/plainyearmonth.md +++ b/docs/plainyearmonth.md @@ -83,8 +83,8 @@ A `RangeError` will also be thrown for strings that contain a `Z` in place of a The `overflow` option works as follows, if `item` is an object: -- In `constrain` mode (the default), any out-of-range values are clamped to the nearest in-range value. -- In `reject` mode, the presence of out-of-range values will cause the function to throw a `RangeError`. +- In `constrain` mode (the default), any out-of-range values are clamped to the nearest in-range value (after assuming extension of eras over arbitrary years to substitute `era` and `eraYear` with appropriate values for the `item`). +- In `reject` mode, the presence of out-of-range values (after assuming extension of eras over arbitrary years to substitute `era` and `eraYear` with appropriate values for the `item`) will cause the function to throw a `RangeError`. The `overflow` option is ignored if `item` is a string. diff --git a/docs/zoneddatetime.md b/docs/zoneddatetime.md index 8f98a8892..166109814 100644 --- a/docs/zoneddatetime.md +++ b/docs/zoneddatetime.md @@ -175,8 +175,8 @@ Instead of using `Temporal.ZonedDateTime` with an offset time zone, it may be ea The `overflow` option works as follows, if `item` is an object: -- In `'constrain'` mode (the default), any out-of-range values are clamped to the nearest in-range value. -- In `'reject'` mode, the presence of out-of-range values will cause the function to throw a `RangeError`. +- In `'constrain'` mode (the default), any out-of-range values are clamped to the nearest in-range value (after assuming extension of eras over arbitrary years to substitute `era` and `eraYear` with appropriate values for the `item`). +- In `'reject'` mode, the presence of out-of-range values (after assuming extension of eras over arbitrary years to substitute `era` and `eraYear` with appropriate values for the `item`) will cause the function to throw a `RangeError`. The `overflow` option is ignored if `item` is a string. diff --git a/polyfill/lib/calendar.mjs b/polyfill/lib/calendar.mjs index 0b5eeeca7..6b0fe9d56 100644 --- a/polyfill/lib/calendar.mjs +++ b/polyfill/lib/calendar.mjs @@ -1461,9 +1461,6 @@ const makeHelperGregorian = (id, originalEras) => { ({ code, names = [] }) => code === era || ES.Call(ArrayPrototypeIncludes, names, [era]) ]); if (!matchingEra) throw new RangeErrorCtor(`Era ${era} (ISO year ${eraYear}) was not matched by any era`); - if (eraYear < 1 && matchingEra.reverseOf) { - throw new RangeErrorCtor(`Years in ${era} era must be positive, not ${year}`); - } if (matchingEra.reverseOf) { year = matchingEra.anchorEpoch.year - eraYear; } else { diff --git a/spec/calendar.html b/spec/calendar.html index d8553c504..d7b88c9e6 100644 --- a/spec/calendar.html +++ b/spec/calendar.html @@ -1348,6 +1348,13 @@
When the fields of _fields_ are inconsistent with respect to a non-~unset~ _fields_.[[Era]], it is recommended that _fields_.[[Era]] and _fields_.[[EraYear]] be updated to resolve the inconsistency by appropriate interpretation of out-of-bounds values (rather than throwing a *RangeError*), which is particularly useful for consistent interpretation of dates in calendars with regnal eras.
+