Only you can help us build a free scout media repository!
Please create an account to start uploading your images now.

Template:Date/doc

From ScoutMedia, the free scout media repository

Lua error in Module:Autotranslate at line 72: No fallback page found for autotranslate (base=Template:Documentation subpage, lang=⧼lang⧽).

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 |year= |month= |day= |hour= |minute= |second= }}

Examples:

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

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⧽

ParameterDescriptionDefaultStatus
year
1
yearemptyoptional
month
2
monthemptyoptional
day
3
dayemptyoptional
hourhouremptyoptional
minuteminuteemptyoptional
secondsecondemptyoptional
lang
4
languagelanguage code of the user languageoptional
casecaseemptyoptional
classclassdtstartoptional
trim_year
trim year
trim year100-999optional

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