Difference between revisions of "Template:Dateconvert"

From Keedrah Wiki
Jump to navigation Jump to search
 
(62 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#if: {{{dryear|}}} | {{{dryear}}} DR<span style="font-size:70%"> {{#iferror: [ [[Date Reckoning{{!}}{{#expr: {{{dryear}}} - 424}} WE{{!}}{{#expr: {{{dryear}}} - 1411}} GWR]] ]</span> | An error occured with Dateconvert }} | {{#if: {{{weyear|}}} | {{#expr: {{{weyear}}} + 424}} DR<span style="font-size:70%">[ [[Date Reckoning{{!}}{{{weyear}}} WE{{!}}{{#expr: {{{weyear}}} - 987}} GWR]] ]</span> | {{#if: {{{gwryear|}}} | {{#expr: {{{gwryear}}} + 1411}} DR<span style="font-size:70%">[ [[Date Reckoning{{!}}{{#expr: {{{gwryear}}} + 987}} WE{{!}} {{{gwryear}}} GWR]] ]</span>| no year }}}}}}<noinclude>
+
{{#if: {{{year|}}} |
 +
{{#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]]
  
{{#expr: {{{gwryear}}} + 1411}} DR<span style="font-size:70%">[ [[Date Reckoning{{!}}{{#expr: {{{gwryear}}} + 987}} WE{{!}} {{{gwryear}}} GWR]] ]</span>
+
You can use different reckoning years.
  
Use the DR Notation for date, it will convert to other systems.
+
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:
 
Example:
 
{{dateconvert
 
{{dateconvert
|dryear = 1441
+
|year = 1441
}} blah blah blah
+
|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]