twig filter format_date need only one argument

This commit is contained in:
Tchama 2020-09-10 16:00:32 +02:00
parent 9bc3c20383
commit f7e3ab8824
2 changed files with 4 additions and 4 deletions

View File

@ -59,9 +59,9 @@
<td>{{ f.amount|format_currency('EUR') }}</td>
<td>
{% if f.endDate is not null %}
{{ 'Valid since %startDate% until %endDate%'|trans( { '%startDate%': f.startDate|format_date('long', 'none'), '%endDate%': f.endDate|format_date('long', 'none') } ) }}
{{ 'Valid since %startDate% until %endDate%'|trans( { '%startDate%': f.startDate|format_date('long'), '%endDate%': f.endDate|format_date('long') } ) }}
{% else %}
{{ 'Valid since %startDate%'|trans( { '%startDate%': f.startDate|format_date('long', 'none') } ) }}
{{ 'Valid since %startDate%'|trans( { '%startDate%': f.startDate|format_date('long') } ) }}
{% endif %}
</td>
<td>

View File

@ -19,9 +19,9 @@
<dt>{{ 'Validity period'|trans }}</dt>
<dd>
{% if element.endDate is not null %}
{{ 'Valid since %startDate% until %endDate%'|trans( { '%startDate%': element.startDate|format_date('long', 'none'), '%endDate%': familyMember.endDate|format_date('long', 'none') } ) }}
{{ 'Valid since %startDate% until %endDate%'|trans( { '%startDate%': element.startDate|format_date('long'), '%endDate%': familyMember.endDate|format_date('long') } ) }}
{% else %}
{{ 'Valid since %startDate%'|trans( { '%startDate%': element.startDate|format_date('long', 'none') } ) }}
{{ 'Valid since %startDate%'|trans( { '%startDate%': element.startDate|format_date('long') } ) }}
{% endif %}
</dd>