Jump to content
Toggle menu
  • 8 articles
  • 75 files
  • 7 users
  • 37.8K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Date/doc: Difference between revisions

Template page
4def=language code of the user language
rephrase "{{date}}", can be understood as "use of the template without parameters".
Line 18: Line 18:
|usergroup=all
|usergroup=all
|usage-notes=
|usage-notes=
Date example: 9 January 2009
Examples:
<pre>
*{{xpdoc|date|2009|1|9}}
*{{Date|2009|1|9}}
*{{xpdoc|date|2009|1|9|pl}}
*{{Date|2009|1|9|pl}}
*{{xpdoc|date|2009|1|9|pl|n1=form|v1=gen}}
*{{Date|2009|1|9|pl|form=gen}}
*{{xpdoc|date|2009|1|9|pl|n1=form|v1=ins}}
*{{Date|2009|1|9|pl|form=ins}}
*{{xpdoc|date|2009|1||pl}}
*{{Date|2009|1||pl}}
*{{xpdoc|date|2009|1||pl|n1=form|v1=gen}}
*{{Date|2009|1||pl|form=gen}}
*{{xpdoc|date|2009|1||pl|n1=form|v1=ins}}
*{{Date|2009|1||pl|form=ins}}
</pre>
gives
*{{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}}


=== Microformat ===
=== Microformat ===
{{Tl|Date}} also returns the date, hidden by CSS, in the ISO 8601 format needed by the <!-- hAtom (class="updated"),--> [[w:HCalendar|hCalendar]] (<code>class="dtstart"</code>) <!-- and hCard (class="bday")--> microformat. See [[Commons:Microformats Project|the microformats project]].
The template also returns the date, hidden by CSS, in the ISO 8601 format needed by the <!-- hAtom (class="updated"),--> [[w:HCalendar|hCalendar]] (<code>class="dtstart"</code>) <!-- and hCard (class="bday")--> microformat. See [[Commons:Microformats Project|the microformats project]].
|type=marker
|type=marker
|example=
|example=

Revision as of 07:05, 19 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= }}

Examples:

  • {{date|2009|1|9}} → 9 January 2009
  • {{date|2009|1|9|pl}} → 9 stycznia 2009
  • {{date|2009|1|9|pl|form=gen}} → 9 stycznia 2009
  • {{date|2009|1|9|pl|form=ins}} → 9 stycznia 2009
  • {{date|2009|1|pl}} → styczeń 2009
  • {{date|2009|1|pl|form=gen}} → styczeń 2009
  • {{date|2009|1|pl|form=ins}} → styczeń 2009

Microformat

The template 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

ParameterDescriptionDefaultStatus
1number of the yearemptyoptional
2number of month in the yearemptyoptional
3number of day in the monthemptyoptional
4language code (only needs to be provided if the shall be fixed and independent of the user's preferences)language code of the user languageoptional
formallows 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)emptyoptional

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)


Cookies help us deliver our services. By using our services, you agree to our use of cookies.