The #DATE tag returns a date in accordance with the international date format i.e. YYYY-MM-DD hh-mm-ss.

  • New in : SPIP 1.0

It can be used out-of-loop or in-loop.

Off-loop usage

It returns the current date.

It is the <time datetime='#DATE'>[(#DATE|affdate)]</time>

produces the following HTML code

It is the<time datetime='2018-05-25 16:54:42'>25 may 2018</time>

Use in a loop

In general, it returns the date of publication of an object (article, news item, etc.)

<div class='bloc_actu'>
	<div class='date'>Posted on the <time datetime='#DATE'>[(#DATE|affdate)]</time></div>
	[<div class='texte'>(#TEXTE)</div>]

Special note

If a date is entered incompletely, you must use a "*" after the #DATE tag for understandable display in the public area.

For example, with


-  your date has been entered as "nc-juillet-2009", you will have on display "July 2009"
-  your date has been entered as "nc-non connu-2009", you will have on display "2009"

See also

The article on Managing Dates
The other date tags : #DATE_MODIF, #DATE_REDAC

Filters applying to #DATE
Variants of affdate :

and also

Filters returning partial information of a date

and also

Author Mark Published : Updated : 06/12/21

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