Ruby 1.9 American Style Date Parsing
It would appear that all dates to Ruby 1.9 work as “dd/mm/yyyy”. I have made monkey patch to Ruby’s String that will allow ‘American’ (mm/dd/yyyy) style date processing in Rails to_date method.
Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!
It would appear that all dates to Ruby 1.9 work as “dd/mm/yyyy”. I have made monkey patch to Ruby’s String that will allow ‘American’ (mm/dd/yyyy) style date processing in Rails to_date method.
Comments
Ah ah ah. :D
strftime is for you
these comments suck…
It would appear that all dates to Ruby 1.9 work as “dd/mm/yyyy”.
Seriously? That sucks. I thought if it were a Japanese thing, it’d be YYYY/MM/DD. (And I’m a Brit..)
Oh hai. dd/mm/yyy makes sense. kthnxbai
Post a comment