back to notes

Ruby date parse note

Ruby Date.Parse

Date.Parse ("01-Jan-11") on Windows (Ruby 1.9) , this parses to Jan 1, 2011 On OS X (Ruby 1.8.7) the year is not recognized correctly.

Better to always use Date.strptime(str, fmt)



last updated june 2011