Template:Date/doc: Difference between revisions

From Wikimedia Foundation Governance Wiki
Content deleted Content added
m 1 revision imported from meta:Template:Date/doc
{{Meta-Wiki duplicate content|documentation=true}}
Tag: 2017 source edit
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Documentation subpage}}
{{Documentation subpage}}


{{Meta-Wiki duplicate content|documentation=true}}
Gives a date in the language with a specified code (the default for that code is the result of [[Template:Uselang]], which is <code>{{uselang}}</code>).


Note that this translated date may have a lowercase initial (unless its first term is always capitalized, like month names in English), so that it can be used in the middle of a sentence. At start of a sentence or paragraph (but not at start of an item in an enumerated list that is part of a larger sentence), you may need to embed the template transclusion in a <code><nowiki>{{UCFIRST: }}</nowiki></code> parser call.

{{Tdoc
|1=1
|1d=number of the year
|2=2
|2d=number of month in the year
|3=3
|3d=number of day in the month
|4=lang<br /> 4
|4d=language code
|4def=language code of the user language
|5=form
|5d=allows to specify differing syntactic forms to apply to the date (e.g. in some Polish phrases the month must appear in [[w:Genitive case|genitive form]] instead of nominative, so you have to set <tt>form</tt> to ''gen'')
|name=Date
|desc=You can leave out parts of the data.
|namespace=Template
|usergroup=all
|i18n-method=switch
|i18n-desc=
|seealso=
* [[Template:DateT]]
* [[commons:Template:Date]]
|relieson=<nowiki/>
* [[Template:I18n month]]
* [[Template:Formatnum]]
|examples=<nowiki/>
* {{xpsoc|date|2009|1|9}}
* {{xpsoc|date|1970|2|3}}
* {{xpsoc|date|1970|2}}
* {{xpsoc|date|1970}}
* {{xpsoc|date||1|9}}
* {{xpsoc|date||2|3}}
* {{xpsoc|date||2}}
* {{xpsoc|date}}
* {{xpsoc|date|1970|||zh}}
Does not check existence, except for the month number:
* {{xpsoc|date|2009|12|33}}
* {{xpsoc|date|2009|17|33}}
}}
<includeonly>
<includeonly>
[[Category:User interface language dependent templates|Date]]
[[Category:User interface language dependent templates|Date]]
[[Category:Date computing template|Date]]
[[Category:Date computing templates|Date]]
</includeonly>
</includeonly>

Latest revision as of 08:13, 26 March 2024