In practice
This filter applies to a start date tag (#DATE
, #DATE_DEBUT
, etc.) and accepts the three arguments:
[(#DATE_DEBUT|affdate_debut_fin{#DATE_FIN, horaire, format})]
- End date tag. Ex. #DATE_FIN;
- time (optional): yes by default. Set non to hide the hours;
- format (optional): displays format options
- jour: to force the display of the day’s name;
- annee: to force the display of the year;
- abbr: (joker) to display the abbreviated name of the day (Sun. instead of Sunday);
- hcal: (joker) to generate a date in the format HCalendar.
Examples
[(#DATE_DEBUT|affdate_debut_fin{#DATE_FIN})]
generates the following HTML code:
From 5 March at 8.30 am to 6 April at 5 pm
[(#DATE_DEBUT|affdate_debut_fin{#DATE_FIN, non})]
generates the following HTML code:
From 5 March to 6 April
[(#DATE_DEBUT|affdate_debut_fin{#DATE_FIN, oui, jour})]
generates the following HTML code:
From Thursday 5 March at 08:30 to Monday 6 April at 17:00
[(#DATE_DEBUT|affdate_debut_fin{#DATE_FIN, oui, jour abbr})]
generates the following HTML code:
From Thu 5 March at 08:30 am to Mon 6 April at 5 pm
[(#DATE_DEBUT|affdate_debut_fin{#DATE_FIN, oui, jour abbr annee})]
generates the following HTML code:
From Thu 5 March at 08:30 am to Mon 6 April 2020 at 5 pm
If the two dates are in different years...
...the display will automatically integrate the two years.
[(#DATE_DEBUT|affdate_debut_fin{#DATE_FIN})]
generates the following HTML code:
From 5 March 2020 at 08:30 am to 6 April 2021 at 5 pm
See also
Other variants of affdate :