[fix #3342] format letter for date SIRET

This commit is contained in:
pedong 2019-03-27 16:10:54 +01:00
parent fb29d30826
commit f82fdef45f
4 changed files with 10 additions and 10 deletions

View file

@ -122,7 +122,7 @@ module ApplicationHelper
def try_format_date(date)
begin
Date.parse(date).strftime("%d %B %Y")
date.is_a?(String) ? Date.parse(date).strftime("%d %B %Y") : date.strftime("%d %B %Y")
rescue
date
end
@ -130,7 +130,7 @@ module ApplicationHelper
def try_format_datetime(datetime)
begin
Time.zone.parse(datetime).strftime("%d %B %Y %R")
datetime.is_a?(String) ? Time.zone.parse(datetime).strftime("%d %B %Y %R") : datetime.strftime("%d %B %Y %R")
rescue
datetime
end