Difference between revisions of "Template:Rosharan date"

From The Coppermind
Jump to navigation Jump to search
m (should move this to {{vorin date}}?)
m (try)
Line 1: Line 1:
{{{text|{{#switch:{{lc:{{{month|}}}|}}
+
{{#if:{{{1|}}}|<!--
  +
|jes|1=Jes
 
  +
output YYYY.MM.WW.DD
|nan|2=Nan
 
  +
-->{{{year}}}<!--
|chach|3=Chach
 
  +
-->{{#if:{{{month|}}}|{{{1}}}{{number|{{{month}}}|}}<!--
|vev|4=Vev
 
  +
-->{{#if:{{{week|}}}|{{{1}}}{{number|{{{week}}}|}}<!--
|palah|5=Palah
 
  +
-->{{#if:{{{day|}}}|{{{1}}}{{number|{{{day}}}|}}<!--
|shash|6=Shash
 
  +
-->}}|}}|}}<!--
|betab|7=Betab
 
  +
|kak|8=Kak
 
  +
-->|<!--
|tanat|9=Tanat
 
  +
|ish|10=Ish
 
  +
output textual month/week/day parts followed by numeric year (surrounded with YYYY.MM.WW.DD titled span)
}}{{#switch:{{lc:{{{week|}}}|}}
 
  +
|jes|1=es
 
  +
-->{{{text|<span title="{{date/sa|.|year={{{year}}}|month={{{month|}}}|week={{{week|}}}|day={{{day|}}}|}}"><!--
|nan|2=an
 
  +
|chach|3=ach
 
  +
-->{{#switch:{{number|{{{month|}}}|}}|1=Jes|2=Nan|3=Chach|4=Vev|5=Palah|6=Shash|7=Betab|8=Kak|9=Tanat|10=Ish}}<!--
|vev|4=ev
 
  +
-->{{#switch:{{number|{{{week| }}}|}}| 1=es| 2=an| 3=ach| 4=ev| 5=ah| 6=ash| 7=ab| 8=ak| 9=at|10=ish}}<!--
|palah|5=ah
 
  +
-->{{#switch:{{number|{{{day| }}}|}}| 1=es| 2=an| 3=ach| 4=ev| 5=ah}}<!--
|shash|6=ash
 
  +
|betab|7=ab
 
 
--> {{{year|}}}</span>}}}<!--
|kak|8=ak
 
  +
|tanat|9=at
 
  +
ENDIFEQ
|ish|10=ish
 
  +
-->}}<noinclude>
}}{{#switch:{{lc:{{{day|}}}|}}
 
|jes|1=es
 
|nan|2=an
 
|chach|3=ach
 
|vev|4=ev
 
|palah|5=ah
 
}} {{{year|}}}}}}<noinclude>
 
   
 
This template's format is: <nowiki>{{date/sa|year=YYYY|month=MM|week=WW|day=DD}}</nowiki>
 
This template's format is: <nowiki>{{date/sa|year=YYYY|month=MM|week=WW|day=DD}}</nowiki>
Line 34: Line 28:
   
 
Examples:
 
Examples:
 
* The input <nowiki>{{date/sa|year=1174|month=1|week=1|day=1}}</nowiki> would yield '''{{date/sa|year=1174|month=1|week=1|day=1}}'''.
 
   
 
* The input <nowiki>{{date/sa|year=1174}}</nowiki> would yield '''{{date/sa|year=1174}}'''.
 
* The input <nowiki>{{date/sa|year=1174}}</nowiki> would yield '''{{date/sa|year=1174}}'''.
  +
 
* The input <nowiki>{{date/sa|year=1174|month=1|week=1|day=1}}</nowiki> yields '''{{date/sa|year=1174|month=1|week=1|day=1}}'''.
  +
  +
* The input <nowiki>{{date/sa|year=1174|month=1|week=1|day=1|.}}</nowiki> yields '''{{date/sa|year=1174|month=1|week=1|day=1|-}}'''.
   
 
[[Category: Templates]]
 
[[Category: Templates]]

Revision as of 18:58, 8 December 2017

This template's format is: {{date/sa|year=YYYY|month=MM|week=WW|day=DD}}

This template outputs dates according to the Vorin format. This template takes in the arguments year, month, week, and day. You need not use every argument in order for this template to work.

Examples:

  • The input {{date/sa|year=1174}} would yield <span title="Template loop detected: Template:Date/sa"> 1174.
  • The input {{date/sa|year=1174|month=1|week=1|day=1}} yields <span title="Template loop detected: Template:Date/sa">Jeseses 1174.
  • The input {{date/sa|year=1174|month=1|week=1|day=1|.}} yields 1174-1-1-1.

Users