Template:Date/doc: Difference between revisions

From Vintage Story Wiki
(Created page with "Multilingual template to display date. == Examples == Demonstrate how to use the template. The section below should list out every parameter with a description, such that a user should be able to just copy-paste it into a page for use. <pre>{{date|2016|06|10}}</pre> → {{date|2016|06|10}} <pre>{{date||06}}</pre> → {{date||06}} <pre>{{date|2016}}</pre> → {{date|2016}}")
 
(Add TemplateData)
 
Line 1: Line 1:
Multilingual template to display date.
Multilingual template to display date.
== Parameters ==
<templatedata>
{
"description": "3 anonymous parameters",
"params": {
"1": {
"description": "Year",
"example": "2016",
"type": "number"
},
"2": {
"description": "Month",
"example": "06",
"type": "number"
},
"3": {
"description": "Day",
"example": "10",
"type": "number"
}
}
}
</templatedata>


== Examples ==
== Examples ==
Demonstrate how to use the template. The section below should list out every parameter with a description, such that a user should be able to just copy-paste it into a page for use.
<pre>{{date|2016|06|10}}</pre> → {{date|2016|06|10}}
<pre>{{date|2016|06|10}}</pre> → {{date|2016|06|10}}
<pre>{{date||06}}</pre> → {{date||06}}
<pre>{{date||06}}</pre> → {{date||06}}
<pre>{{date|2016}}</pre> → {{date|2016}}
<pre>{{date|2016}}</pre> → {{date|2016}}
The same code on Chinese translation of the page will result this.
<pre>{{date|2016|06|10}}</pre> → {{date|2016|06|10|zh}}
<pre>{{date||06}}</pre> → {{date||06||zh}}
<pre>{{date|2016}}</pre> → {{date|2016|||zh}}

Latest revision as of 20:49, 9 November 2023

Multilingual template to display date.

Parameters

3 anonymous parameters

Template parameters

ParameterDescriptionTypeStatus
11

Year

Example
2016
Numberoptional
22

Month

Example
06
Numberoptional
33

Day

Example
10
Numberoptional

Examples

{{date|2016|06|10}}

{{date||06}}

→ June

{{date|2016}}

The same code on Chinese translation of the page will result this.

{{date|2016|06|10}}

{{date||06}}

→ 6月

{{date|2016}}