Template:Date/docEdit This Page

From FamilySearch Wiki

This template is used to show a date in the language set in the preferences.

You can leave out parts of the data.

Contents

Usage

{{Date|1=|2=|3=|4=|form=|class=}}

Examples:

  • "{{date}}200919" → "200919" [1]
  • "{{date}}200919pl" → "200919pl" [2]
  • "{{date}}200919pl" → "200919pl" [3] - alternative way to get nominative case
  • "{{date}}200919pl" → "200919pl" [4]
  • "{{date}}200919pl" → "200919pl" [5]
  • "{{date}}20091pl" → "20091pl" [6]
  • "{{date}}20091pl" → "20091pl" [7]
  • "{{date}}20091pl" → "20091pl" [8]

Does not check existence, except for the month number:

  • "{{date}}20091233" → "20091233" [9]
  • "{{date}}20091733" → "20091733" [10]

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.

Parameters

Parameter name Description Default value required or optional?

parameter #1 (1) number of the year empty optional
parameter #2 (2) number of month in the year empty optional
parameter #3 (3) number of day in the month empty optional
parameter #4 (4) language code (overrides user's preferences) language code of the user language optional
form allows 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).

empty optional
class allows to set the html class of the time node where the date is included. This is useful for microformats. The default value is, for legacy reasons, "dtstart" (used by hCalendar). See the microformats project. dtstart 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}} - Allows to specify a range of non-trivial date notations in a format that is localizable


  • This page was last modified on 5 February 2014, at 22:41.
  • This page has been accessed 120 times.