Template:Date/doc: Difference between revisions
More actions
form=ins |
also used for workperiod etc. |
||
| Line 12: | Line 12: | ||
|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'') | |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 | |name=Date | ||
|desc=This template is used to show | |desc=This template is used to show a date in the language set in the preferences. | ||
You can leave out parts of the data. | You can leave out parts of the data. | ||
Revision as of 09:57, 14 September 2010
This template is used to show a date in the language set in the preferences.
You can leave out parts of the data.
Usage
{{Date |1= |2= |3= |4= |form= }}
Date example: 9 January 2009
*{{Date|2009|1|9}}
*{{Date|2009|1|9|pl}}
*{{Date|2009|1|9|pl|form=gen}}
*{{Date|2009|1|9|pl|form=ins}}
*{{Date|2009|1||pl}}
*{{Date|2009|1||pl|form=gen}}
*{{Date|2009|1||pl|form=ins}}
gives
- 9 January 2009
- 9 stycznia 2009
- 9 stycznia 2009
- 9 styczniem 2009
- styczeń 2009
- stycznia 2009
- styczniem 2009
Microformat
{{Date}} also returns the date, hidden by CSS, in the ISO 8601 format needed by the hCalendar (class="dtstart") microformat. See the microformats project.
Template parameters
| Parameter | Description | Default | Status | |
|---|---|---|---|---|
1 | number of the year | empty | optional | |
2 | number of month in the year | empty | optional | |
3 | number of day in the month | empty | optional | |
4 | language code (only needs to be provided if the language shall be fixed and independent of the user's preferences) | value of {{int:Lang}} | optional | |
form | allows to specify differing syntactic forms to apply to the date (e.g. in some Polish phrases the month must appear in genitive form instead of nominative, so you have to set form to gen) | empty | 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:
{{I18n month}}, {{Formatnum}}
See also
{{ISOdate}} – Template used to parse the date in {{Information}}; {{Other date}}
Localization
To add your language to the list of languages supported by this template, please edit the template and add a row to the "{{LangSwitch|}}" construct. It takes the form "|xx= Your translation " (xx being the code of your language)