mirror of
https://github.com/discourse/discourse.git
synced 2025-03-25 21:35:53 +08:00
universal date format in digest email
This commit is contained in:
parent
617dc42cd9
commit
90d41a994a
@ -44,9 +44,9 @@ class UserNotifications < ActionMailer::Base
|
|||||||
|
|
||||||
def short_date(dt)
|
def short_date(dt)
|
||||||
if dt.year == Time.now.year
|
if dt.year == Time.now.year
|
||||||
I18n.l(dt, format: :short_no_year)
|
dt.strftime("%B #{dt.day.ordinalize}")
|
||||||
else
|
else
|
||||||
I18n.l(dt, format: :short)
|
dt.strftime("%B #{dt.day.ordinalize}, %Y")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user