Difference between revisions of "Template:Rosharan date"

m
Fix for *.1.2 (see, e.g., WoR 6 epigraph)
m
m (Fix for *.1.2 (see, e.g., WoR 6 epigraph))
 
(26 intermediate revisions by 3 users not shown)
{{#if:{{{year|}}}{{#switch:{{lc:{{{monthno-year|{{{1}}}|}}}|}}<!--
|jes|1=Jes
|nan|2=Nan
|chach|3=Chach
|vev|4=Vev
|palah|5=Palah
|shash|6=Shash
|betab|7=Betab
|kak|8=Kak
|tanat|9=Tanat
|ish|10=Ish
}}{{#switch:{{lc:{{{week|{{{2}}}|}}}|}}
|jes|1=es
|nan|2=an
|chach|3=ach
|vev|4=ev
|palah|5=ah
|shash|6=ash
|betab|7=ab
|kak|8=ak
|tanat|9=at
|ish|10=ish
}}{{#switch:{{lc:{{{day|{{{3}}}|}}}|}}
|jes|1=es
|nan|2=an
|chach|3=ach
|vev|4=ev
|palah|5=ah
}}<noinclude>
 
--><span class="date rosharan-date" {{#if:{{{month|}}}|title="{{Rosharan numeric date|{{{year}}}|{{{month|}}}|{{{week|}}}|{{{day|}}}|}}"}}><!--
Vorin dates are in Vorin dates
 
-->{{#switch:{{number|{{{month|}}}|}}|1=Jes|2=Nan|3=Chach|4=Vev|5=Palah|6=Shash|7=Betab|8=Kak|9=Tanat|10=Ish{{#if:{{{week|}}}||i}}<!-- -->}}<!--
[[Category: Templates]]
-->{{#switch:{{number|{{{week| }}}|}}| 1=es| 2={{#switch:{{number|{{{month|}}}|}}|1=n}}an| 3=ach| 4=ev| 5=ah| 6=ash| 7=ab| 8=ak| 9={{#if:{{{day|}}}|{{#switch:{{number|{{{month|}}}|}}|8=t| #default=at}}|at}}|10=ish{{#if:{{{day|}}}||i}}<!-- -->}}<!--
-->{{#switch:{{number|{{{day| }}}|}}| 1=es| 2=an| 3=ach| 4=ev| 5=ah}}<!--
 
-->{{#if:{{{month|}}}|&#32;}}{{{year|}}}</span><!--
 
end of {{{year}}}
-->|{{#if:{{{1|}}}|<!--
 
--><span class="date rosharan-date" {{#if:{{{2|}}}|title="{{Rosharan numeric date|{{{1}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|}}"}}><!--
 
-->{{#switch:{{number|{{{2|}}}|}}|1=Jes|2=Nan|3=Chach|4=Vev|5=Palah|6=Shash|7=Betab|8=Kak|9=Tanat|10=Ish{{#if:{{{3|}}}||i}}<!-- -->}}<!--
-->{{#switch:{{number|{{{3|}}}|}}| 1=es| 2={{#switch:{{number|{{{2|}}}|}}|1=n}}an| 3=ach| 4=ev| 5=ah| 6=ash| 7=ab| 8=ak| 9={{#if:{{{4|}}}|{{#switch:{{number|{{{2|}}}|}}|8=t| #default=at}}|at}}|10=ish{{#if:{{{4|}}}||i}}<!-- -->}}<!--
-->{{#switch:{{number|{{{4|}}}|}}| 1=es| 2=an| 3=ach| 4=ev| 5=ah}}<!--
 
-->{{#if:{{{2|}}}|&#32;|}}{{#if:{{{missing-date|}}}{{{date-missing|}}}|<span class="error" title="{{date/no-args}}">?</span>&#32;}}{{{1|}}}</span><!--
 
end of {{{1}}}
-->|<!--
 
--><includeonly><span class="date rosharan-date"><span class="error" title="{{date/no-args}}">?</span></span></includeonly><!--
 
-->}}|}}<noinclude>This template outputs dates according to the [[Vorin]] format. {{t|Rosharan date|YYYY|MM|WW|DD}}
 
This template can take in the arguments ''year'', ''month'', ''week'', and ''day''. You need not use every argument in order for this template to work. If any more than the year parameter is provided the date will be converted into a Vorin textual form, and hovering will show in the {{t|Rosharan numeric date}} format <code>YYYY.MM.WW.DD</code>. If the <code>missing-date</code> parameter is filled instead of the month/week/day parts, it will show a red question-mark with a hover error message. Similarly if the <code>year</code> is missing the template will show an error question-mark unless the <code>no-year</code> parameter is passed. See {{t|date/no-args}} for a list of templates which require more detail to be added.
 
For reference, ''[[The Way of Kings]]'' is mostly set in 1173 and ''[[Oathbringer]]'' is set at the end of 1174.
 
[[category: date templates]]
 
== Examples ==
* The input {{t|Rosharan date|1174}} would yield '''{{Rosharan date|1174}}'''.
* The input {{t|Rosharan date|1174|2|3|4}} yields '''{{Rosharan date|1174|2|3|4}}'''.
* The input {{t|Rosharan numeric date|1174|2|3|4}} yields '''{{Rosharan numeric date|1174|2|3|4}}'''.
 
== Articles using Template ==
{{for|Special:WhatLinksHere/{{FULLPAGENAME}}|a full listing|here}}
{{Special:WhatLinksHere/{{FULLPAGENAME}}|namespace=0}}