Skip to content

Conversation

robertbastian
Copy link
Member

The Hijri calendars are basically exclusively religious, so we have precedent for something like this.

@robertbastian robertbastian marked this pull request as ready for review August 26, 2025 15:48
@robertbastian robertbastian requested review from Manishearth, sffc and a team as code owners August 26, 2025 15:48
@sffc sffc changed the title Add Christian holidays to Gregorian and Julian Add Easter holiday to Gregorian and Julian Aug 26, 2025
Copy link
Member

@sffc sffc left a comment

Choose a reason for hiding this comment

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

I approve because:

  1. Calculating the date of Easter is a calendrical calculation, not simply a fixed date or "first Monday of the month", so it is something useful for our calendar types to offer
  2. There are secular use cases for Easter since many countries, especially in Europe, have federal holidays that are derived from the date of Easter

Comment on lines +211 to +215

/// Returns the date of (Orthodox) Easter in the given year.
pub fn easter(year: i32) -> Date<Self> {
Date::from_rata_die(calendrical_calculations::julian::easter(year), Self)
}
Copy link
Member

Choose a reason for hiding this comment

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

Thought: Should this go in the Coptic calendar, too?

Copy link
Member Author

Choose a reason for hiding this comment

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

Those two calendars are close enough to the Julian calendar that they use the dates as calculated by the Julian calendar: https://en.wikipedia.org/wiki/Coptic_calendar#Easter. So they should be constructed like Julian::easter(y).to_calendar(Coptic/Ethiopian).

In fact, the only use case I see for Julian::easter is Julian::easter(y).to_calendar(c), as no country actually uses the Julian calendar, and it's not in AnyCalendar.

@robertbastian robertbastian merged commit 5b5b5ba into unicode-org:main Aug 26, 2025
32 checks passed
@robertbastian robertbastian deleted the easter branch August 26, 2025 16:15
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.

2 participants