Browse Source

Fixed an issue with date parsing

development
Godwin 7 years ago
committed by GitHub
parent
commit
fc413fd7f6
  1. 1
      app/helpers/i18n_helper.rb

1
app/helpers/i18n_helper.rb

@ -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

Loading…
Cancel
Save