Applied to a tag returning a date in RFC 3339 format (2012-03-27T22:54:10Z), the |normaliser_date
filter will transpose the date into the form "Year-month-day Hours:minutes:seconds" (2012-03-28 00:55:41).
Example:
Your date field (#DATE
) is saved in "Y-m-d" format and does not take hours, minutes or seconds into account. But you need to compare this date with another date which does take hours into account. To make these two elements comparable, you need to set your date to the correct format using this filter:
[(#DATE|normaliser_date)]
This filter offers an additional option:
by giving it a "true" argument, the filter transforms all "-00" values (i.e. month or day not defined) into "-01" values.
For example: [(#VAL{2012-00-00}|normaliser_date{true})]
,
will display: « 2012-01-01 00:00:00».