Fixed an issue with date parsing

This commit is contained in:
Godwin 2017-08-22 15:04:44 -07:00 committed by GitHub
parent 5ce78fe940
commit fc413fd7f6

View File

@ -32,6 +32,7 @@ module I18nHelper
end end
def date(date, format = :long) def date(date, format = :long)
return '' unless date.present?
I18n.l(date.is_a?(String) ? Date.parse(date) : date, format: format) I18n.l(date.is_a?(String) ? Date.parse(date) : date, format: format)
end end