You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to have formatted and localized date with month name uppercased and abbreviated.
# without uppercase works goodI18n.localize(Time.zone.local(2018,5,11),format: "%e %b %Y",locale: :de)=>"11 Mai 2018"# but with uppercase..# formatting from https://apidock.com/ruby/DateTime/strftimeI18n.localize(Time.zone.local(2018,5,11),format: "%e %^b %Y",locale: :de)=>"11 MAY 2018"
What actually happened
The %^bdirective is no supported in I18n and it returns always english version of the string.
What I expected to happen
When %^bdirective is used, the I18n maps use upcase method in abbreviated month name.
Versions of i18n, rails, and anything else you think is necessary
On 16 Jan 2019, 20:14 +1100, Mariusz Błaszczak ***@***.***>, wrote:
What I tried to do
I wanted to have formatted and localized date with month name uppercased and abbreviated.
# without uppercase works good
I18n.localize(Time.zone.local(2018, 5, 11), format: "%e %b %Y", locale: :de)
=> "11 Mai 2018"
# but with uppercase..
# formatting from https://apidock.com/ruby/DateTime/strftime
I18n.localize(Time.zone.local(2018, 5, 11), format: "%e %^b %Y", locale: :de)
=> "11 MAY 2018"
What actually happened
The %^bdirective is no supported in I18n and it returns always english version of the string.
What I expected to happen
When %^bdirective is used, the I18n maps use upcase method in abbreviated month name.
Versions of i18n, rails, and anything else you think is necessary
rails (5.2.2)
i18n (1.5.2)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
What I tried to do
I wanted to have formatted and localized date with month name uppercased and abbreviated.
What actually happened
The
%^b
directive is no supported in I18n and it returns always english version of the string.What I expected to happen
When
%^b
directive is used, the I18n maps use upcase method in abbreviated month name.Versions of i18n, rails, and anything else you think is necessary
The code where upcasing might take place:
https://github.com/ruby-i18n/i18n/blob/master/lib/i18n/backend/base.rb#L250-L261
The text was updated successfully, but these errors were encountered: