adzap / timeliness

Fast date/time parsing for the control freak.
http://github.com/adzap/timeliness
MIT License
224 stars 28 forks source link

Standard I18n formats parsing. #11

Open Exoth opened 11 years ago

Exoth commented 11 years ago

I think that for every locale this code should return true:

>> I18n.l(Date.new(2013,1,2), format: :long).to_date == Date.new(2013,1,2)

but it just gives an error even for :en locale ("January 02, 2013"):

NoMethodError: undefined method `map' for nil:NilClass

whilst even the standard parser successfully parses the format for :en locale.

So the current standard I18n date formats should be automatically added to the timeliness formats. How do you think?