This filter is applied to dates to present them in various formats.

-  |affdate displays the date in text form, e.g. "13 January 2001".

[SPIP 1.8] extended the notation of this filter. It can be passed a date formatting parameter that corresponds either to a SPIP format ("'saison'", etc.) or to a PHP date command format ("'Y-m-d'"). For example:

    • [(#DATE|affdate{'Y-m'})] will display the numerical year and month of the date, separated by a hyphen,
    • the syntax [(#DATE|affdate{'saison'})] is completely identical in operation to : [(#DATE|saison)].

-  There are also variants of affdate which offer some common short-cuts: |affdate_court, |affdate_jourcourt and |affdate_mois_annee.

Author Mark Published : Updated : 26/10/12

Translations : català, English, Español, français, Nederlands