No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
Sets the release date of a game. For use with [[Template:Gamebox]]. Adds a category pointing to the year the game is released, if a date is given, or adds [[:Category:Unknown Release Date]] if none is given. | Sets the release date of a game. For use with [[Template:Gamebox]]. Adds a category pointing to the year the game is released, if a date is given, or adds [[:Category:Unknown Release Date]] if none is given. | ||
{{ReleaseDate|2012-1-2 (foo);January 1, 2013 (bar)}} | {{ReleaseDate|2012-1-2 (foo);January 1, 2013 (bar)}} | ||
{{ReleaseDate|2012-1-2}} | |||
{{ReleaseDate|2012-01-02}} | |||
</noinclude> | </noinclude> | ||
{{#if:{{{1|}}}| | {{#if:{{{1|}}}| | ||
{{#if:{{#pos:{{{1|}}}|;}}| | {{#if:{{#pos:{{{1|}}}|;}}| | ||
{{#arraymap:{{{1}}}|;|x|{{#rreplace:x|([\d\-\,\w\s]+) \((.+)\)|{{#set:Has release dates=$1;$2}}{{Date|$1}} $1 ($2)}}|<br>}}| | {{#arraymap:{{{1}}}|;|x|{{#rreplace:x|([\d\-\,\w\s]+) \((.+)\)|{{#set:Has release dates=$1;$2}}{{Date|$1}} $1 ($2)}}|<br>}}| | ||
{{#ifeq:{{ | {{#ifeq:{{NAMESPACENUMBER}}|0|[[Category:Released in {{#time:Y|{{{1}}}}}]]|}}{{#set:Has release date={{{1}}}}}{{Date|{{{1}}}}} | ||
}} | }} | ||
|{{#ifeq:{{ | |{{#ifeq:{{NAMESPACENUMBER}}|0|[[Category:Unknown Release Date]]|}}[[:Category:Unknown Release Date|Unknown]] | ||
}} | }} |
Revision as of 01:06, 30 August 2023
Sets the release date of a game. For use with Template:Gamebox. Adds a category pointing to the year the game is released, if a date is given, or adds Category:Unknown Release Date if none is given.
[[:Category:Released in Error: Invalid time.|
Error: Invalid time.]] 2012-1-2 (foo)
[[:Category:Released in Error: Invalid time.|
Error: Invalid time.]] January 1, 2013 (bar)