In the modern Gregorian calendar, Easter Day is 'the first Sunday after the first full moon on or after the vernal equinox'. At first glance, it seems impossible to calculate that date programmatically. However, the following VFP function will do the job.
FUNCTION Easter * Calculates the date of Easter for a given year. * Accepts years in the range 100 to 9999. However, * for years before the adoption of the Gregorian * Calendar (1582 - 1587 in much of Europe, 1752 in * Britain and North America) the calculation * is inappropriate.
IF EMPTY(tnYear) OR NOT BETWEEN(tnYear,100,9999) ERROR "Invalid year for Easter calculation" ENDIF
LOCAL lnCentury, lnG, lnI, lnK, lnJ, lnL LOCAL lnEasterDay, lnEasterMonth