Template:Get year: Difference between revisions
Vivaporius (talk | contribs) (Created page with "{{#ifeq:"{{lc:{{{1|1900}}}}}"|"{{Four digit|{{#expr:{{{1|1900}}}}}}}"|{{{1|1900}}}|{{#time:Y|{{{1|November 1, 1900}}} }}}}<noinclude> {{documentation}} <!-- Categories go on t...") |
Vivaporius (talk | contribs) m (1 revision imported) |
(One intermediate revision by one other user not shown) | |
(No difference)
|
Latest revision as of 16:50, 12 May 2022
1900
Purpose[edit]
Given a plain text date, returns the year. Accepts ISO 8601, a variety of date formats as well as a year-only date specification.
Limitations[edit]
Does [not?] understand BC / AD and may not deliver accurate results for single-digit dates.
Examples[edit]
{{Get year}}
1900{{Get year|}}
2024{{Get year|1946}}
1946{{Get year|July 3, 1965}}
1965{{Get year|16 November 1971}}
1971{{Get year|1975-12-19}}
1975{{Get year|3-7-2005}}
Error: Invalid time.{{Get year|3/27/2015}}
Error: Invalid time.{{Get year|1997 January 8}}
Error: Invalid time.{{Get year|0711}}
0711