Skip to content

Conversation

@ben-allen
Copy link
Collaborator

Removed a check for era year range validity from NonISOCalendarDateToISO, since "out of range" values for eras are fine. Allows for removal of IsValidEraYearForCalendar AO altogether, since NonISOCalendarDateToISO only place it was called from.

fix #87

See: #87 (comment)

years from `NonISOCalendarDateToISO`, since "out of range" values for
eras are fine.

See: tc39#87 (comment)
@ben-allen ben-allen requested a review from ptomato November 7, 2025 18:26
</dd>
</dl>
<emu-alg>
1. Let _era_ be CanonicalizeEraInCalendar(_calendar_, _era_).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: I think this part is still necessary?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_era_ is not used outside the removed AO. Canonicalization still happens in CalendarDateArithmeticYearForEraYear

(unless I'm misreading something here...)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I see! Yeah that's fine then.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CalendarDateArithmeticYearForEraYear expects CanonicalizeEraInCalendar returns a non-undefined value. This is no longer the case when IsValidEraYearForCalendar is removed altogether.

</dd>
</dl>
<emu-alg>
1. Let _era_ be CanonicalizeEraInCalendar(_calendar_, _era_).
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CalendarDateArithmeticYearForEraYear expects CanonicalizeEraInCalendar returns a non-undefined value. This is no longer the case when IsValidEraYearForCalendar is removed altogether.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IsValidEraYearForCalendar: Don't check for minimum/maximum era year?

3 participants