Skip to content

Instantly share code, notes, and snippets.

/ruby.rb Secret

Created October 19, 2015 10:58
Show Gist options
  • Save anonymous/3e9162ca59053cd902b7 to your computer and use it in GitHub Desktop.
Save anonymous/3e9162ca59053cd902b7 to your computer and use it in GitHub Desktop.
irb(main):001:0> require 'time'
=> true
irb(main):002:0> Time.parse('31.11.2015').strftime('%d.%m.%Y')
=> "01.12.2015"
irb(main):003:0> Time.parse('32.11.2015').strftime('%d.%m.%Y')
ArgumentError: argument out of range
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment