Difference between revisions of "OmniPrereleases/FormatName"

From Sega Retro

Line 1: Line 1:
<includeonly>{{#sub:{{{1}}}|{{#expr:{{#pos:{{{1}}}|;}}+1}}}}</includeonly><noinclude>Split off because it was starting to get complicated.
+
<includeonly>{{#vardefine:currentprotoname|{{#sub:{{{1}}}|{{#expr:{{#pos:{{{1}}}|;}}+1}}}}}}{{
 +
#ifeq:{{#len:{{#var:currentprotoname}}}}|10|{{#vardefine:lastyear|{{#var:currentyear}}}}{{#vardefine:currentyear|{{#sub:{{#var:currentprotoname}}|0|4}}}}
 +
  {{#ifeq:{{#var:lastyear}}
 +
  |{{#var:currentyear}}
 +
  |{{#vardefine:currentprotoname|{{#sub:{{#var:currentprotoname}}|5}}}}
 +
  }}
 +
|}}{{#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.
Line 5: Line 11:
 
==Example==
 
==Example==
 
<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|Mega Drive prototype; 1994-04-18}}{{OmniPrereleases/FormatName|Mega Drive prototype; 1994-04-18}}{{OmniPrereleases/FormatName|Mega Drive prototype; 1995-04-18}}
  
 
[[Category:Templates]]
 
[[Category:Templates]]
 
</noinclude>
 
</noinclude>

Revision as of 12:26, 3 March 2022

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.

Example

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

1994-04-18


04-1804-181995-04-18