Template:Date/sandbox

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
Template documentationview · edit · history · purge ]
This documentation is transcluded from Template:Date/sandbox/doc.

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= |class= }}

Examples:

  • {{date/sandbox|2009|1|9}} → 9 January 2009
  • {{date/sandbox|2009|1|9|pl}} → 9 stycznia 2009
  • {{date/sandbox|2009|1|9|pl|form=}} → 9 stycznia 2009 - alternative way to get nominative case
  • {{date/sandbox|2009|1|9|pl|form=gen}} → 9 stycznia 2009
  • {{date/sandbox|2009|1|9|pl|form=ins}} → 9 stycznia 2009
  • {{date/sandbox|2009|1|pl}} → styczeń 2009
  • {{date/sandbox|2009|1|pl|form=gen}} → styczeń 2009
  • {{date/sandbox|2009|1|pl|form=ins}} → styczeń 2009
  • {{date/sandbox|year=888|lang=pl|form=ins|trim_year=yes}}
  • {{date/sandbox|year=888|lang=pl|form=ins|trim_year=no}}
  • {{date/sandbox|year=888|lang=pl|form=ins|trim_year=100-999}}
  • {{date/sandbox|year=888|lang=pl|form=ins|trim_year=100-500}}

Does not check existence, except for the month number:

  • {{date/sandbox|2009|12|33}} → December 2009
  • {{date/sandbox|2009|17|33}} → 2009

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 grammatical case for the month in YYYY-MM dates, for languages that use them. Possible cases: Also Partitive (ptv), Inessive (ine), Elative (ela) and Illative (ill) cases are supported for Finnish language, in addition to Nominative and Genitive (gen).emptyoptional
classallows to set the html class of the time node where the time is included. This is useful for microformats. The default value is, for legacy reasons, "dtstart" (used by hCalendar). See the microformats project.dtstartoptional

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}}<br\> {{Other date}} - Allows to specify a range of non-trivial date notations in a format that is localizable

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)