Difference between revisions of "Template:Dateconvert"

From Keedrah Wiki
Jump to navigation Jump to search
 
(20 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#if: {{{dryear|}}} |  
+
{{#if: {{{year|}}} |
 
+
{{#if: {{{reckon|}}} |
 
+
{{#switch: {{{reckon}}}
{{{dryear}}} DR<span style="font-size:70%"> &#91;[[Date Reckoning{{!}}{{#expr: {{{dryear}}} - 424}} WE{{#ifexpr: {{{dryear}}} - 1411 > 0 | &#124;{{#expr: {{{dryear}}} - 1411}} GWR}}]]&#93;</span>  
+
| gwr = {{#expr: {{{year}}} + 1411}} DR<span style="font-size:70%"> &#91;[[Date Reckoning{{!}}{{#expr: {{{year}}} + 987}} WE{{#ifexpr:{{{year}}} >0 | &#124;{{{year}}} GWR }}]]&#93;</span>
 
+
| dr = {{{year}}} DR{{#ifeq:{{#ifexpr: {{{year|}}}  - 424 < 1 | true | false}} | {{#ifexpr: {{{year|}}} - 1411 < 1 | true | whocares}}| | <span style="font-size:70%"> &#91;[[Date Reckoning{{!}}{{#ifexpr: {{{year|}}}  - 424 > 0 |{{#expr: {{{year|}}} - 424}} WE}}{{#ifexpr: {{{year|}}} - 1411 > 0 | &#124;{{#expr: {{{year|}}} - 1411}} GWR}}]]&#93;</span> }}
 
+
| we = {{#expr: {{{year}}} + 424}} DR<span style="font-size:70%"> &#91;[[Date Reckoning{{!}}{{{year}}} WE{{#ifexpr: {{{year}}} - 987 > 0 | &#124;{{#expr: {{{year}}} - 987}} GWR}}]]&#93;</span>  
| {{#if: {{{weyear|}}} | {{#expr: {{{weyear}}} + 424}} DR<span style="font-size:70%"> &#91;[[Date Reckoning{{!}}{{{weyear}}} WE{{#ifexpr: {{{weyear}}} - 987 > 0 | &#124;{{#expr: {{{weyear}}} - 987}} GWR}}]]&#93;</span>  
+
| #default  = <span style="font-size:150%; color:red;font-weight:bold">Year Not Correctly Given: year parameter must be numeric, reckon parameter must be "dr", "we", or "gwr". See {{fullurl:{{transclude|Template:Date}}}}</span>.
 
+
}}
 +
| <span style="font-size:150%; color:red;font-weight:bold">Year Not Correctly Given: year parameter must be numeric, reckon parameter must be "dr", "we", "gwr", or "fd". See {{fullurl:{{transclude|Template:Date}}}}</span>.}}
 +
| <span style="font-size:150%; color:red;font-weight:bold">Year Not Correctly Given: year parameter must be numeric, reckon parameter must be "dr", "we", "gwr", or "fd". See {{fullurl:{{transclude|Template:Date}}}}.</span>.}} <noinclude>
  
| {{#if: {{{gwryear|}}} | {{#expr: {{{gwryear}}} + 1411}} DR<span style="font-size:70%"> &#91;[[Date Reckoning{{!}}{{#expr: {{{gwryear}}} + 987}} WE{{#ifexpr:{{{gwryear}}} >0 | &#124;{{{gwryear}}} GWR }}]]&#93;</span>
+
[[Category:Templates]]
 
 
 
 
| <span style="font-size:150%; color:red;font-weight:bold">Year Not Correctly Given: Use dryear, weyear or gwryear</span>}}}}}}<noinclude>
 
  
 
You can use different reckoning years.
 
You can use different reckoning years.
  
dryear = DR Reckoning<br/>
+
reckon = DR - Danberg<br/>
weyear =  WE reckoning<br/>
+
reckon =  WE - Windman Empire <br/>
gwryear = GWR Reckoning.<br/>
+
reckon = GWR - Greater Races War.<br/>
 +
year = must be a year value
 
If no year is given, it yells at you in big red text.
 
If no year is given, it yells at you in big red text.
 
This template converts the date and displays the conversion, as shown in the example below.
 
This template converts the date and displays the conversion, as shown in the example below.
Line 24: Line 24:
 
Example:
 
Example:
 
{{dateconvert
 
{{dateconvert
|dryear = 1441
+
|year = 1441
 +
|reckon = dr
 
}}
 
}}
 
 
</noinclude>
 

Latest revision as of 18:29, 6 October 2018

Year Not Correctly Given: year parameter must be numeric, reckon parameter must be "dr", "we", "gwr", or "fd". See http://keedrah.wiki/Template:Date..

You can use different reckoning years.

reckon = DR - Danberg
reckon = WE - Windman Empire
reckon = GWR - Greater Races War.
year = must be a year value If no year is given, it yells at you in big red text. This template converts the date and displays the conversion, as shown in the example below.


Example: 1441 DR [1017 WE|30 GWR]