[fix #3342] format letter for date SIRET
This commit is contained in:
parent
fb29d30826
commit
f82fdef45f
4 changed files with 10 additions and 10 deletions
|
@ -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
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
%td= etablissement.naf
|
||||
%tr
|
||||
%th.libelle Date de création :
|
||||
%td= etablissement.entreprise.date_creation&.strftime("%d/%m/%Y")
|
||||
%td= try_format_date(etablissement.entreprise.date_creation)
|
||||
%tr
|
||||
%th.libelle Effectif de l'organisation :
|
||||
%td= effectif(etablissement)
|
||||
|
@ -64,10 +64,10 @@
|
|||
%td= etablissement.association_objet
|
||||
%tr
|
||||
%th.libelle Date de création :
|
||||
%td= etablissement.association_date_creation&.strftime("%d/%m/%Y")
|
||||
%td= try_format_date(etablissement.association_date_creation)
|
||||
%tr
|
||||
%th.libelle Date de publication :
|
||||
%td= etablissement.association_date_publication&.strftime("%d/%m/%Y")
|
||||
%td= try_format_date(etablissement.association_date_publication)
|
||||
%tr
|
||||
%th.libelle Date de déclaration :
|
||||
%td= etablissement.association_date_declaration&.strftime("%d/%m/%Y")
|
||||
%td= try_format_date(etablissement.association_date_declaration)
|
||||
|
|
|
@ -13,12 +13,12 @@
|
|||
|
||||
%li
|
||||
Date de création :
|
||||
= etablissement.association_date_creation&.strftime('%d/%m/%Y')
|
||||
= try_format_date(etablissement.association_date_creation)
|
||||
|
||||
%li
|
||||
Date de déclaration :
|
||||
= etablissement.association_date_declaration&.strftime('%d/%m/%Y')
|
||||
= try_format_date(etablissement.association_date_declaration)
|
||||
|
||||
%li
|
||||
Date de publication :
|
||||
= etablissement.association_date_publication&.strftime('%d/%m/%Y')
|
||||
= try_format_date(etablissement.association_date_publication)
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
%li
|
||||
Date de création :
|
||||
= etablissement.entreprise.date_creation&.strftime('%d/%m/%Y')
|
||||
= try_format_date(etablissement.entreprise.date_creation)
|
||||
|
||||
%li
|
||||
Effectif organisation :
|
||||
|
|
Loading…
Reference in a new issue