Created
February 28, 2013 17:01
-
-
Save vagmi/5058247 to your computer and use it in GitHub Desktop.
A lot of people were sending me emails about Friday the 29th of February. What they forget is that 2013 is not a leap year. The nearest leap year where Feb 29th is a friday is 2036. If you do not believe me, you can run the script your self.
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
| require 'date' | |
| year=2012 | |
| until(DateTime.parse("#{year}-02-29").strftime("%a")=="Fri") | |
| year=year+4 | |
| end | |
| puts year |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment