@Echo Off SetLocal UnAlias * :: Not a complete test, but better than nothing: If "%1" NE "" .AND. %@Numeric[%1] EQ 1 .AND. %1 GT 1582 Goto Start Echo %0 - Calculates the date of Easter Text Michael Bednarek http://www.geocities.com.mcmbednarek/ based on NANFORUM's Clipper Toolkit EASTER.PRG Input: A year after 1582 (yyyy) Output: The date of Easter (dd month) EndText Quit :Start Set nYear=%1 :: nGold is the Golden Number of the year in the 19 year Metonic cycle: Set nGold=%@Eval[%nYear %% 19 + 1] :: nCent is Century: Set nCent=%@Int[%@Eval[%nYear / 100 + 1]] :: Corrections: :: nCorx is the number of years in which leap-year was dropped in order :: to keep step with the sun: Set nCorx=%@Int[%@Eval[%nCent * 3 / 4 - 12]] :: nCorz is a special correction to synchronize Easter with the moon's orbit: Set nCorz=%@Int[%@Eval[(%nCent * 8 + 5) / 25 - 5]] :: nSunday Find Sunday: Set nSunday=%@Int[%@Eval[(%nYear * 5) / 4 - %nCorx - 10]] :: nEpact specifies occurence of a full moon: Set nEpact=%@Int[%@Eval[(%nGold * 11 + 20 + %nCorz - %nCorx) %% 30]] If %nEpact LT 0 Set nEpact=%@Eval[%nEpact + 30] If (%nEpact EQ 25 .AND. %nGold GT 11) .OR. %nEpact EQ 24 Set nEpact=%@Inc[%nEpact] :: Find full moon - the nMoon'th of MARCH is a "calendar" full moon Set nMoon=%@Eval[44 - %nEpact] If %nMoon LT 21 Set nMoon=%@Eval[%nMoon + 30] :: Advance to Sunday Set nMoon=%@Int[%@Eval[%nMoon + 7 - (%nSunday + %nMoon) %% 7]] :: Get Month and Day Iff %nMoon GT 31 Then Set nMonth=April Set nDay=%@Eval[%nMoon - 31] Else Set nMonth=March Set nDay=%nMoon EndIff Echo Easter in %nYear is on %nMonth %nDay