Skip to content

Instantly share code, notes, and snippets.

@bradediger
Created February 11, 2009 23:09
Show Gist options
  • Save bradediger/62348 to your computer and use it in GitHub Desktop.
Save bradediger/62348 to your computer and use it in GitHub Desktop.
>> RUBY_VERSION
=> "1.8.6"
>> Date.parse('1/2/2009').to_s
=> "2009-01-02" # one of these things is not like the other
>> Date.parse('1-2-2009').to_s
=> "2009-02-01"
>> RUBY_VERSION
=> "1.9.1"
>> Date.parse('1/2/2009').to_s
=> "2009-02-01"
>> Date.parse('1-2-2009').to_s
=> "2009-02-01"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment