Now the type of object for localization is determined by line:
# lib/i18n/backend/base.rb, line 53
type = object.respond_to?(:sec) ? 'time' : 'date'
But why don't you determine DateTime? I suggest something like:
type = case object.class
It's helpfull very much - we haven't think about the DateTime type!
I aggree that that condition is not the best way of handling it, but in my opinion Time and DateTime formats (https://github.com/svenfuchs/rails-i18n/blob/master/rails/locale/en.yml#L194) should be the same, as from UI point of user there is no difference between Time and DateTime . Did you meet any case when you needed different localizing for DateTime and Time ?