Skip to content

Instantly share code, notes, and snippets.

@vvalgis
Created December 18, 2012 12:25
Show Gist options
  • Save vvalgis/4327550 to your computer and use it in GitHub Desktop.
Save vvalgis/4327550 to your computer and use it in GitHub Desktop.
month day ranges
dates = [10 ,11, 12].map {|y| (1..12).map {|m| [1, ( m == 2 ? ((y % 4) == 0 ? 29 : 28) : ((m % 2) == 0 ? (m < 8 ? 30 : 31) : (m < 8 ? 31 : 30))), m, y] } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment