**SPIP**
# Article submitted
The article "**|extraire_date**
(SPIP)" is submitted
for publication. on Sunday 4 October 2020.
* * *
## |extraire_date
Sunday 4 October 2020 , by [jack](.././?page=auteur&id_auteur=593&)
The filter **code>|extraire_date</code>** extracts the first date
encountered in the tag to which it applies.
The filter **`|extraire_date`** extracts a date from any tag containing a
date in the form YYYY-MM or YYYY-MM-DD. If your tag contains several dates
in one of these forms the filter will only extract the first date
encountered.
An example:
In your `#DESCRIPTIF`, you have
«In 2012-03, various discussions have been launched on the future of the
squirrel and its post-winter exit".
With **`[(#DESCRIPTIF|extraire_date)]`**, SPIP will display «2012-03-01».
The filter will add "-01" to the date to be in YYYY-MM-DD format.
**Warning**: if your `#DESCRIPTIF` contains a date in the form YYYY-MM-DD
as in:
«On 2012-03-25, a great discussion came to a climax following an
insignificant but pertinent remark,»
the filter will replace "25" with "01" and display "2012-03-01".
— Sent by SPIP (https://www.spip.net/)
![]()