Template:Is time/doc
Appearance
![]() | This is a documentation subpage for Template:Is time. It may contain usage information, categories and other content that is not part of the original template page. |
Usage
[edit]Used with a single unnamed parameter.
Returns 1 if the param is a timestamp, and returns nothing otherwise. It uses the parserfunction {{#time:}}
, which itself uses PHP and MediaWiki to determine whether something is validly parseable as a time.
This does not work in every situation (e.g. "2024 February" and "February 2024" don't parse even though they are clearly times).
Here are some examples:
Code | Output |
---|---|
{{Is time|2024}}
|
1 |
{{Is time|2024 }}
|
1 |
{{Is time|February 2024}}
|
|
{{Is time|2024 February}}
|
|
{{Is time|2024-01}}
|
1 |
{{Is time|2024-01-01}}
|
1 |
{{Is time|2024-01-01 23:54:12}}
|
1 |
{{Is time|January 1}}
|
|
{{Is time|February}}
|
|
{{Is time|20240706230825}}
|
1 |
{{Is time|December 31, 1970}}
|
|
{{Is time|5:00}}
|
1 |
{{Is time|The geese are on the lease!}}
|
|
{{Is time|2021-03-04 baba booey}}
|