|date_relative

  • New in : SPIP 1.4

The |date_relative filter, when applied to any #DATE... type tag, will display information associated with the tag depending on the context date.

Example: the current date and time is Friday 25th September 2009 14:20. An article was recently published on Wednesday 23rd September 2009 at 10:20.

[(#DATE|date_relative)]

in this circumstance will return:
2 days and 4 hours ago.

On the other hand, if your site is configured to display articles regardless of nominated publication date, then an article "published" on Sunday 27th September 2009 at 18:20 will display:
In 2 days and 4 hours.

Author Mark Published : Updated : 15/07/23

Translations : català, English, français, Nederlands