Skip to content

Instantly share code, notes, and snippets.

@Veejay
Created October 30, 2012 18:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Veejay/3982128 to your computer and use it in GitHub Desktop.
Save Veejay/3982128 to your computer and use it in GitHub Desktop.
Date handling
irb(main):009:0> d = Date.new(2012, 12, 31)
=> #<Date: 2012-12-31 ((2456293j,0s,0n),+0s,2299161j)>
irb(main):010:0> d.cweek
=> 1
irb(main):011:0> d.year
=> 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment