i18n_alchemy icon indicating copy to clipboard operation
i18n_alchemy copied to clipboard

Converted dates are converted to string on parse

Open fmluizao opened this issue 9 years ago • 0 comments

I18n::Alchemy::DateParser.parse("07/07/2015") => "2015-07-07"

From I18n::Alchemy::DateParser#parse, we have:

build_object(parsed_date).to_s

Why we need to convert the date back to string? I think it's better just return the Date object. ActiveRecord will not complain, and the parser would be more generic.

Thoughts?

fmluizao avatar Jul 24 '15 13:07 fmluizao