moduleData.Time.Calendar.Easter(sundayAfter,orthodoxPaschalMoon,orthodoxEaster,gregorianPaschalMoon,gregorianEaster)where-- formulae from Reingold & Dershowitz, _Calendrical Calculations_, ch. 8.importData.Time.CalendarimportData.Time.Calendar.Julian-- | The next Sunday strictly after a given day.sundayAfter::Day->DaysundayAfterday=addDays(7-(mod(toModifiedJulianDayday+3)7))day-- | Given a year, find the Paschal full moon according to Orthodox Christian traditionorthodoxPaschalMoon::Integer->DayorthodoxPaschalMoonyear=addDays(-shiftedEpact)(fromJulianjyear419)whereshiftedEpact=mod(14+11*(modyear19))30jyear=ifyear>0thenyearelseyear-1-- | Given a year, find Easter according to Orthodox Christian traditionorthodoxEaster::Integer->DayorthodoxEaster=sundayAfter.orthodoxPaschalMoon-- | Given a year, find the Paschal full moon according to the Gregorian methodgregorianPaschalMoon::Integer->DaygregorianPaschalMoonyear=addDays(-adjustedEpact)(fromGregorianyear419)wherecentury=(divyear100)+1shiftedEpact=mod(14+11*(modyear19)-(div(3*century)4)+(div(5+8*century)25))30adjustedEpact=ifshiftedEpact==0||((shiftedEpact==1)&&(modyear19<10))thenshiftedEpact+1elseshiftedEpact-- | Given a year, find Easter according to the Gregorian methodgregorianEaster::Integer->DaygregorianEaster=sundayAfter.gregorianPaschalMoon