Open main menu

Changes

m
Migrating 3 interwiki links, now provided by Wikidata on d:Q6870716
{{documentation subpage}}
This template is used to check whether the given parameter is a month. It is useful for templates such as {{tl|Multiple issues}} that sort articles into [[:Category:Wikipedia cleanup|cleanup categories]] by month.

If the parameter is a month/date/time formatted in the way recognized by [http://php.net/manual/en/function.strtotime.php PHP's strtotime()], this template returns the month in the format <code>Month Year</code>, where <code>Month</code> is written in full and <code>Year</code> is written in 4 digits.

If the parameter is not a month/date/time, the empty string is returned.

{| class="wikitable"
! Input
! Output
|-
| <nowiki>{{Check date|April 2003}}</nowiki>
| {{Check date|April 2003}}
|-
| <nowiki>{{Check date|2003 April}}</nowiki>
| {{Check date|2003 April}}
|-
| <nowiki>{{Check date|Apr 2003}}</nowiki>
| {{Check date|Apr 2003}}
|-
| <nowiki>{{Check date|April 3 2003}}</nowiki>
| {{Check date|April 3 2003}}
|-
| <nowiki>{{Check date|April 03}}</nowiki>
| {{Check date|April 03}} (thinks it is April 3 of the current year)
|-
| <nowiki>{{Check date|Garbage^&*text}}</nowiki>
| {{Check date|Garbage^&*text}}
|}
<includeonly>
[[Category:Time, date and calendar templates|{{PAGENAME}}]]
</includeonly>
Anonymous user