Created
December 13, 2014 14:30
-
-
Save bjartwolf/ff7582c9c2c1b070d797 to your computer and use it in GitHub Desktop.
easter.fs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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