Template:DByear: Difference between revisions

From Wikipedia of the Dark Brotherhood, an online Star Wars Club
m (Adding missing ABY for a few years)
m (Trying to fix weird code block behavior when used in Succession template)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{#switch: {{{1}}}  
<onlyinclude>{{#switch: {{{1}}}  
| {{{1}}} > 2015 = {{#expr:{{{1}}}-1982}} ABY  
| {{{1}}} > 2015 = {{#expr:{{{1}}}-1982}} ABY  
| {{{1}}} < 2003 = {{#expr:{{{1}}}-1990}} ABY  
| {{{1}}} < 2003 = {{#expr:{{{1}}}-1990}} ABY  
Line 24: Line 24:
| ({{{1}}} == 2014 and {{{2}}} > 3) or ({{{1}}} == 2015 and {{{2}}} < 4) = 32 ABY
| ({{{1}}} == 2014 and {{{2}}} > 3) or ({{{1}}} == 2015 and {{{2}}} < 4) = 32 ABY
| {{{1}} == 2015 = 33 ABY
| {{{1}} == 2015 = 33 ABY
| {{{1}}} }}
| {{{1}}} }}</onlyinclude>
<noinclude>


<noinclude>
To use this template, enter <nowiki>{{DByear|real year in YYYY format|optional month in M format}}</nowiki>. This will convert the calendar year to the DB date for years prior to the Exodus (1994-2002) and after the DB year was mapped to the calendar year (2016-present). For the period when the DB year cycled every April and November, you should also include the month for accurate results. If you don't, the template will make a best guess with 50% accuracy.
To use this template, enter <nowiki>{{DByear|real year in YYYY format|optional month in M format}}</nowiki>. This will convert the calendar year to the DB date for years prior to the Exodus (1994-2002) and after the DB year was mapped to the calendar year (2016-present). For the period when the DB year cycled every April and November, you should also include the month for accurate results. If you don't, the template will make a best guess with 50% accuracy.


[[Category: Utility templates|{{PAGENAME}}]]</noinclude>
[[Category: Utility templates|{{PAGENAME}}]]</noinclude>

Latest revision as of 14:16, 12 August 2024

{{{1}}}


To use this template, enter {{DByear|real year in YYYY format|optional month in M format}}. This will convert the calendar year to the DB date for years prior to the Exodus (1994-2002) and after the DB year was mapped to the calendar year (2016-present). For the period when the DB year cycled every April and November, you should also include the month for accurate results. If you don't, the template will make a best guess with 50% accuracy.