Difference between revisions of "OmniPrereleases/FormatName"

From Sega Retro

(Created page with "<includeonly>{{#sub:{{{1}}}|{{#pos:{{{1}}}|;}}}}</includeonly><noinclude>Split off because it was starting to get complicated. This template formats the names of prototypes s...")
 
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>{{#sub:{{{1}}}|{{#pos:{{{1}}}|;}}}}</includeonly><noinclude>Split off because it was starting to get complicated.
+
<includeonly>{{#vardefine:currentprotoname|{{#if:{{#pos:{{{1}}}|;}}|{{#sub:{{{1}}}|{{#expr:{{#pos:{{{1}}}|;}}+1}}}}|{{ucfirst:{{{1}}}}}}}}}{{
 +
 
 +
#ifexpr:{{#len:{{#var:currentprotoname}}}}>=10|{{
 +
#switch:{{#sub:{{#var:currentprotoname}}|0|4}}
 +
<!--check the first four characters are a valid year. ifexpr fails if it's not an integer -->
 +
|1970|1971|1972|1973|1974|1975|1976|1977|1978|1979
 +
|1980|1981|1982|1983|1984|1985|1986|1987|1988|1989
 +
|1990|1991|1992|1993|1994|1995|1996|1997|1998|1999
 +
|2000|2001|2002|2003|2004|2005|2006|2007|2008|2009
 +
|2010|2011|2012|2013|2014|2015|2016|2017|2018|2019
 +
|2020|2021|2022|2023|2024|2025|2026|2027|2028|2029={{#vardefine:lastyear|{{#var:currentyear}}}}{{#vardefine:currentyear|{{#sub:{{#var:currentprotoname}}|0|4}}}}{{
 +
#ifeq:{{#var:lastyear}}
 +
  |{{#var:currentyear}}
 +
  |{{#vardefine:currentprotoname|{{#sub:{{#var:currentprotoname}}|5}}}}
 +
  }}
 +
}}
 +
|}}{{
 +
#vardefine:currentprotoname|{{#replace:{{#var:currentprotoname}}|SG-1000 prototype|Prototype}}}}{{
 +
#vardefine:currentprotoname|{{#replace:{{#var:currentprotoname}}|Master System prototype|Prototype}}}}{{
 +
#vardefine:currentprotoname|{{#replace:{{#var:currentprotoname}}|Game Gear prototype|Prototype}}}}{{
 +
#vardefine:currentprotoname|{{#replace:{{#var:currentprotoname}}|Mega Drive prototype|Prototype}}}}{{
 +
#vardefine:currentprotoname|{{#replace:{{#var:currentprotoname}}|Mega-CD prototype|Prototype}}}}{{
 +
#vardefine:currentprotoname|{{#replace:{{#var:currentprotoname}}|32X prototype|Prototype}}}}{{
 +
#vardefine:currentprotoname|{{#replace:{{#var:currentprotoname}}|Saturn prototype|Prototype}}}}{{
 +
#vardefine:currentprotoname|{{#replace:{{#var:currentprotoname}}|Dreamcast prototype|Prototype}}}}{{
 +
#vardefine:currentprotoname|{{#replace:{{#var:currentprotoname}}|PlayStation 2 prototype|Prototype}}}}{{
 +
#vardefine:currentprotoname|{{#replace:{{#var:currentprotoname}}|GameCube prototype|Prototype}}}}{{
 +
#vardefine:currentprotoname|{{#replace:{{#var:currentprotoname}}|GameCube NPDP prototype|NPDP prototype}}}}{{
 +
#vardefine:currentprotoname|{{#replace:{{#var:currentprotoname}}|GameCube E3|E3}}}}<!-- for Sonic Heroes -->{{
 +
#vardefine:currentprotoname|{{#replace:{{#var:currentprotoname}}|Wii prototype|Prototype}}}}{{
 +
#vardefine:currentprotoname|{{#replace:{{#var:currentprotoname}}|Xbox prototype|Prototype}}}}{{
 +
#vardefine:currentprotoname|{{#replace:{{#var:currentprotoname}}|Xbox E3|E3}}}}<!-- for Sonic Heroes -->{{
 +
#vardefine:currentprotoname|{{#replace:{{#var:currentprotoname}}|Xbox 360 prototype|Prototype}}}}{{
 +
#vardefine:currentprotoname|{{#replace:{{#var:currentprotoname}}|Game Boy Advance prototype|Prototype}}}}{{#var:currentprotoname}}</includeonly><noinclude>Split off because it was starting to get complicated.
  
 
This template formats the names of prototypes so they're not excessively wordy in Omni templates.
 
This template formats the names of prototypes so they're not excessively wordy in Omni templates.
  
==Example==
+
==Examples==
 
<pre>{{OmniPrereleases/FormatName|Mega Drive prototype; 1994-04-18}}</pre>
 
<pre>{{OmniPrereleases/FormatName|Mega Drive prototype; 1994-04-18}}</pre>
 +
{{OmniPrereleases/FormatName|Mega Drive prototype; 1994-04-18}}
  
{{OmniPrereleases/FormatName|Mega Drive prototype; 1994-04-18}}
+
 
 +
 
 +
*{{OmniPrereleases/FormatName|prototype; 1994-12-08}}
 +
*{{OmniPrereleases/FormatName|prototype; 1994-12-14}}
 +
*{{OmniPrereleases/FormatName|prototype; 1994-12-28 SB}}
 +
*{{OmniPrereleases/FormatName|prototype; 1995-01-01 TST}}
 +
*{{OmniPrereleases/FormatName|prototype; 1995-01-03 TST}}
 +
*{{OmniPrereleases/FormatName|prototype; 1995-01-05}}
 +
*{{OmniPrereleases/FormatName|prototype; 1995-01-09 TST}}
 +
*{{OmniPrereleases/FormatName|prototype; 1995-01-10}}
 +
*{{OmniPrereleases/FormatName|prototype; 1995-01-14 RM}}
 +
*{{OmniPrereleases/FormatName|prototype; 1995-01-16}}
 +
*{{OmniPrereleases/FormatName|prototype; 1995-01-18 RM}}
 +
*{{OmniPrereleases/FormatName|prototype; 1995-01-20}}
 +
*{{OmniPrereleases/FormatName|prototype; 1995-01-25}}
 +
*{{OmniPrereleases/FormatName|prototype; 1995-01-30}}
 +
*{{OmniPrereleases/FormatName|prototype; 1995-02-02}}
 +
*{{OmniPrereleases/FormatName|prototype; 1995-02-03}}
 +
*{{OmniPrereleases/FormatName|prototype; 1995-02-07}}
 +
*{{OmniPrereleases/FormatName|prototype; 1995-02-09 B}}
 +
*{{OmniPrereleases/FormatName|prototype; 1995-02-09}}
 +
*{{OmniPrereleases/FormatName|prototype; 1995-02-11}}
 +
*{{OmniPrereleases/FormatName|prototype; 1995-02-12}}
 +
*{{OmniPrereleases/FormatName|prototype; 1995-02-13}}
 +
*{{OmniPrereleases/FormatName|prototype; 1995-02-14}}
 +
*{{OmniPrereleases/FormatName|prototype; 1995-02-15}}
 +
*{{OmniPrereleases/FormatName|game Gear prototype}}
 +
*{{OmniPrereleases/FormatName|GameCube NPDP prototype}}
 +
*{{OmniPrereleases/FormatName|GameCube E3 version}}
  
 
[[Category:Templates]]
 
[[Category:Templates]]
 
</noinclude>
 
</noinclude>

Latest revision as of 20:06, 1 January 2024

Split off because it was starting to get complicated.

This template formats the names of prototypes so they're not excessively wordy in Omni templates.

Examples

{{OmniPrereleases/FormatName|Mega Drive prototype; 1994-04-18}}

1994-04-18


  • 12-08
  • 12-14
  • 12-28 SB
  • 1995-01-01 TST
  • 01-03 TST
  • 01-05
  • 01-09 TST
  • 01-10
  • 01-14 RM
  • 01-16
  • 01-18 RM
  • 01-20
  • 01-25
  • 01-30
  • 02-02
  • 02-03
  • 02-07
  • 02-09 B
  • 02-09
  • 02-11
  • 02-12
  • 02-13
  • 02-14
  • 02-15
  • Prototype
  • NPDP prototype
  • E3 version