Difference between revisions of "Template:Dateconvert"

From Keedrah Wiki
Jump to navigation Jump to search
 
(108 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#iferror: {{#expr: {{{year}}} + 1}} | "An error occured" }}
+
{{#if: {{{year|}}} |
<noinclude>
+
{{#if: {{{reckon|}}} |
 +
{{#switch: {{{reckon}}}
 +
| 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>
 +
| #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>
 +
 
 +
[[Category:Templates]]
 +
 
 +
You can use different reckoning years.
 +
 
 +
reckon = DR - Danberg<br/>
 +
reckon =  WE - Windman Empire <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.
 +
This template converts the date and displays the conversion, as shown in the example below.
 +
 
 +
 
 +
Example:
 
{{dateconvert
 
{{dateconvert
|year = 1
+
|year = 1441
 +
|reckon = dr
 
}}
 
}}
 
Use the DR Notation for date, it will convert to other systems.
 

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]