Template:Is time/doc
![]() | 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
Used with a single unnamed parameter. Returns 1 if the param is a timestamp, and returns nothing otherwise. It uses the parserfunction <syntaxhighlight lang="wikitext" inline></syntaxhighlight>, 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 |
---|---|
<syntaxhighlight lang="wikitext" inline>1</syntaxhighlight> | 1 |
<syntaxhighlight lang="wikitext" inline>1</syntaxhighlight> | 1 |
<syntaxhighlight lang="wikitext" inline></syntaxhighlight> | |
<syntaxhighlight lang="wikitext" inline></syntaxhighlight> | |
<syntaxhighlight lang="wikitext" inline>1</syntaxhighlight> | 1 |
<syntaxhighlight lang="wikitext" inline>1</syntaxhighlight> | 1 |
<syntaxhighlight lang="wikitext" inline>1</syntaxhighlight> | 1 |
<syntaxhighlight lang="wikitext" inline></syntaxhighlight> | |
<syntaxhighlight lang="wikitext" inline></syntaxhighlight> | |
<syntaxhighlight lang="wikitext" inline>1</syntaxhighlight> | 1 |
<syntaxhighlight lang="wikitext" inline></syntaxhighlight> | |
<syntaxhighlight lang="wikitext" inline>1</syntaxhighlight> | 1 |
<syntaxhighlight lang="wikitext" inline></syntaxhighlight> | |
<syntaxhighlight lang="wikitext" inline></syntaxhighlight> |