Skip to content

Instantly share code, notes, and snippets.

@bjartwolf
Created December 13, 2014 14:30
Show Gist options
  • Save bjartwolf/ff7582c9c2c1b070d797 to your computer and use it in GitHub Desktop.
Save bjartwolf/ff7582c9c2c1b070d797 to your computer and use it in GitHub Desktop.
easter.fs
let ``In Western Christianity, using the Gregorian calendar, Easter always falls on a Sunday between 22 March and 25 April inclusive``(date: DateTime) =
let easter = EasterDay date.Year
let firstPossibleDay = new DateTime(date.Year, 3, 22)
let lastPossibleDay = new DateTime(date.Year, 4, 25)
easter >= firstPossibleDay && easter <= lastPossibleDay && easter.DayOfWeek = DayOfWeek.Sunday
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment