Expand description
§Overview
Calculate the date of Easter Sunday in Gregorian/Julian calendar using the computus method.
§Features
Optional features:
- [
chrono
][]: Enable directly producing achrono::NaiveDate
§Example
You can find when Easter is for a particular year with:
// For Gregorian calendars
let easter = computus::gregorian(2016).unwrap();
assert_eq!((easter.month, easter.day), (3, 27));
// For Julian calendars
let easter = computus::julian(2016).unwrap();
assert_eq!((easter.month, easter.day), (4, 18));
// With `chrono` feature
#[cfg(feature = "chrono")] {
use chrono::Datelike;
let easter = computus::gregorian_naive(2023).unwrap();
assert_eq!((easter.month(), easter.day()), (4, 9));
}