Template:Check date
Revision as of 22:44, 21 April 2007 by imported>Pomte (moved User:Pomte/Template to Template:Checkdate)
This template is used to check whether the given parameter is a month. It is useful for templates such as {{Articleissues}} that sort articles into cleanup categories by month.
If the parameter is a month/date/time formatted in the way recognized by PHP's strtotime(), this template returns the month in the format Month Year, where Month is written in full and Year is written in 4 digits.
If the parameter is not a month/date/time, the empty string is returned.
| Input | Output |
|---|---|
| {{checkdate|April 2007}} | April 2007 |
| {{checkdate|April 1 2007}} | April 2007 |
| {{checkdate|Apr 2007}} | April 2007 |
| {{checkdate|Apr 07}} | April 2026 |
| {{checkdate|y}} | January 2026 |