Difference between revisions of "Template:Rosharan numeric date"

From The Coppermind
Jump to navigation Jump to search
(+tempalte)
 
m (→‎Users: modernize)
 
(3 intermediate revisions by the same user not shown)
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:
 
-->}}|}}|}}<!--
 
-->}}|}}|}}<!--
   
  +
-->|<!--
--></includeonly><noinclude>
 
  +
  +
otherwise use up to four numbered parameters
  +
  +
-->{{{1}}}<!--
  +
-->{{#if:{{{2|}}}|{{{sep|.}}}|}}<!--
  +
-->{{{2|}}}<!--
  +
-->{{#if:{{{3|}}}|{{{sep|.}}}|}}<!--
  +
-->{{{3|}}}<!--
  +
-->{{#if:{{{4|}}}|{{{sep|.}}}|}}<!--
  +
-->{{{4|}}}<!--
  +
 
-->}}</includeonly><noinclude>[[category: date templates]]
   
 
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|2=year=YYYY|3=month=MM|4=week=WW|5=day=DD}}</code>
+
:<code>{{t|Rosharan numeric date|YYYY|MM|WW|DD}}</code>
   
A <code>{{{year}}}</code> must be given, but the <code>{{{month}}}</code>, <code>{{{week}}}</code>, or <code>{{{day}}}</code> are optional up to the precision wanted. <code>{{{sep}}}</code> can be used to exchange the <code>.</code> for a different separator.
+
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.
   
  +
== Articles using Template ==
[[category: templates]]
 
  +
{{for|Special:WhatLinksHere/{{FULLPAGENAME}}|a full listing|here}}
  +
{{Special:WhatLinksHere/{{FULLPAGENAME}}|namespace=0}}

Latest revision as of 08:54, 19 April 2020


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.

Articles using Template[edit]