Created
June 7, 2012 15:44
-
-
Save jordelver/2889547 to your computer and use it in GitHub Desktop.
Calculate the last day of the month
This file contains 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
# From http://rubyquicktips.com/post/350625885/calculate-the-last-day-of-the-month | |
>> Date.civil(2010, 02, -1) | |
=> Sun, 28 Feb 2010 | |
>> Date.civil(2010, -1, -5) | |
=> Mon, 27 Dec 2010 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment