Difference between revisions of "Template:Rosharan numeric date"
Jump to navigation
Jump to search
(+tempalte) |
m (add positional variant) |
||
Line 1: | Line 1: | ||
<includeonly><!-- output YYYY.MM.WW.DD |
<includeonly><!-- output YYYY.MM.WW.DD |
||
+ | |||
+ | if year is passed use named parameters |
||
+ | -->{{#if:{{{year|}}}|<!-- |
||
+ | |||
-->{{{year}}}<!-- |
-->{{{year}}}<!-- |
||
-->{{#if:{{{month|}}}|{{{sep|.}}}{{number|{{{month}}}|}}<!-- |
-->{{#if:{{{month|}}}|{{{sep|.}}}{{number|{{{month}}}|}}<!-- |
||
Line 6: | Line 10: | ||
-->}}|}}|}}<!-- |
-->}}|}}|}}<!-- |
||
+ | -->|<!-- |
||
⚫ | |||
+ | |||
+ | otherwise use up to four numbered parameters |
||
+ | |||
+ | -->{{{1}}}<!-- |
||
+ | -->{{#if:{{{2|}}}|{{{sep|.}}}|}}<!-- |
||
+ | -->{{{2|}}}<!-- |
||
+ | -->{{#if:{{{3|}}}|{{{sep|.}}}|}}<!-- |
||
+ | -->{{{3|}}}<!-- |
||
+ | -->{{#if:{{{4|}}}|{{{sep|.}}}|}}<!-- |
||
+ | -->{{{4|}}}<!-- |
||
+ | |||
⚫ | |||
This template outputs a [[Rosharan]] numeric date in the format <code>YYYY.MM.DD.HH</code> up to the precision given. Usage is similar to {{t|Rosharan date}}: |
This template outputs a [[Rosharan]] numeric date in the format <code>YYYY.MM.DD.HH</code> up to the precision given. Usage is similar to {{t|Rosharan date}}: |
||
− | :<code>{{t|Rosharan numeric date| |
+ | :<code>{{t|Rosharan numeric date|YYYY|MM|WW|DD}}</code> |
− | + | The <code>YYYY</code> is mandatory, but the <code>MM</code>, <code>WW</code>, or <code>DD</code> are optional up to the precision wanted. <code>{{{sep}}}</code> can be used to exchange the <code>.</code> for a different separator. |
|
[[category: templates]] |
[[category: templates]] |
Revision as of 13:03, 9 December 2017
This template outputs a Rosharan numeric date in the format YYYY.MM.DD.HH
up to the precision given. Usage is similar to {{Rosharan date}}
:
{{Rosharan numeric date|YYYY|MM|WW|DD}}
The YYYY
is mandatory, but the MM
, WW
, or DD
are optional up to the precision wanted. {{{sep}}}
can be used to exchange the .
for a different separator.