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".