0 votes

Hi !

I'm trying to display a transaction metadata that contains an ISO date like "2011-12-03T10:15:30", and I get an error saying that the value is not a date.

For reference, here the code for the delivery-date.twig template mentionned in the issue :

<div class="infoItem">
	<div class="infoItemLabel">{% include '../snippet/delivery-date.twig' %}</div>
	<div class="infoItemValue">{{ '2011-12-03T10:15:30' | date }}</div>
</div>

Your documentation doesn't tell what type of value the date filter accepts, but based on the provided example {# user.dateOfBirth = 'October 21, 2015' #}, I assumed string values where valid.

Could you please explain to me why it does not work as expected?

asked by Mathias OBERSON (270 points)

Please log in or register to answer this question.