From 90d41a994acb8b24356fd9b86d9daf01a26bfbef Mon Sep 17 00:00:00 2001 From: Arpit Jalan Date: Thu, 28 Jan 2016 23:11:20 +0530 Subject: [PATCH] universal date format in digest email --- app/mailers/user_notifications.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/mailers/user_notifications.rb b/app/mailers/user_notifications.rb index 3af7f5d6b9..dbcc9bcb22 100644 --- a/app/mailers/user_notifications.rb +++ b/app/mailers/user_notifications.rb @@ -44,9 +44,9 @@ class UserNotifications < ActionMailer::Base def short_date(dt) if dt.year == Time.now.year - I18n.l(dt, format: :short_no_year) + dt.strftime("%B #{dt.day.ordinalize}") else - I18n.l(dt, format: :short) + dt.strftime("%B #{dt.day.ordinalize}, %Y") end end