Modèle:Date : Différence entre versions
m (1 version) |
m (1 révision importée) |
||
(Une révision intermédiaire par un autre utilisateur non affichée) | |||
Ligne 1 : | Ligne 1 : | ||
− | + | {{#invoke:Date|Date | |
− | + | |year = {{{year|{{{1|}}}}}} | |
− | + | |month = {{{month|{{{2|}}}}}} | |
− | + | |day = {{{day|{{{3|}}}}}} | |
− | + | |hour = {{{hour|}}} | |
− | + | |minute = {{{minute|}}} | |
− | + | |second = {{{second|}}} | |
− | + | |class = {{{class|dtstart}}} | |
− | + | |lang = {{#if:{{{lang|{{{4|}}}}}} | {{{lang|{{{4|}}}}}} | {{int:Lang}} }} | |
− | + | |case = {{{case|{{{form|}}}}}} | |
− | + | |trim_year = {{{trim_year|{{{trim year|100-999}}}}}} | |
− | + | }}<noinclude> | |
− | + | {{documentation}} | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | {{ | ||
</noinclude> | </noinclude> |
Version actuelle datée du 25 janvier 2016 à 21:40
This template is used to show a date in the language set in the preferences.
You can leave out parts of the data.
Sommaire
Usage
{{Date |month= |day= |year= |hour= |minute= |second= }}
Examples:
- Modèle:Xpdoc
- Modèle:Xpdoc
- Modèle:Xpdoc - alternative way to get nominative case
- Modèle:Xpdoc
- Modèle:Xpdoc
- Modèle:Xpdoc
- Modèle:Xpdoc
- Modèle:Xpdoc
- Modèle:Xpdoc
- Modèle:Xpdoc
- Modèle:Xpdoc
- Modèle:Xpdoc
Microformat
The template returns the date, embed in a <time> element with attribute datetime that contain the date in the ISO 8601 format needed by the hCalendar (class="dtstart"
) microformat. See the microformats project.
⧼templatedata-doc-params⧽
Parameter | Description | Default | Status | |
---|---|---|---|---|
month 2 | month | month | empty | optional |
day 3 | day | day | empty | optional |
lang 4 | language | language | language code of the user language | optional |
case | case | case | empty | optional |
year 1 | year | year | empty | optional |
hour | hour | hour | empty | optional |
class | class | class | dtstart | optional |
minute | minute | minute | empty | optional |
second | second | second | empty | optional |
trim_year trim year | trim year | trim or pad the leading zeros in year number | 100-999 | optional |
Additional information
The template is intended to be used in the following namespaces: the Template namespace
The template is intended to be used by the following user groups: all users
Relies on:
Module:Date
⧼Seealso⧽
{{ISOdate}} – Template used to parse the date in {{information}}
{{other date}} - Allows to specify a range of non-trivial date notations in a format that is localizable
Localize the date format at Module:I18n/date or request assistance at Template talk:Date or Module talk:I18n/date
The above documentation is transcluded from Modèle:Date/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |