Created
November 12, 2013 19:04
-
-
Save gmrdad82/7436797 to your computer and use it in GitHub Desktop.
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
d1 = Date.parse('jan 1 2011') | |
d2 = Date.parse('dec 31 2012') | |
(d1..d2).map{ |m| m.strftime('%Y%m') }.uniq.map{ |m| Date::ABBR_MONTHNAMES[ Date.strptime(m, '%Y%m').mon ] + ' ' + m.first(4) } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment