แม่แบบ:Start date and years ago/doc

จากวิกิพีเดีย สารานุกรมเสรี

This template shows the date of establishment of an institution, company etc. and its age in years.

This template should not be used for the date of birth or death of people, use {{birth date and age}} or {{death date and age}} instead.

The template requires "YYYY|MM|DD" parameters. Do not use for "YYYY" nor "YYYY|MM" dates.

Usage[แก้]

{{Start date and years ago|YYYY|MM|DD}} will give Month D, YYYY; XX years ago

Examples[แก้]

Using the default American date format[แก้]

{{Start date and years ago|2009|4|11}} displays "11 เมษายน 2009; 14 ปีก่อน (2009-04-11)"

{{Start date and years ago|2007|4|11}} displays "11 เมษายน 2007; 16 ปีก่อน (2007-04-11)"

{{Start date and years ago|1812|10|21}} displays "21 ตุลาคม 1812; 211 ปีก่อน (1812-10-21)"

{{Start date and years ago|1812|10|1}} displays "1 ตุลาคม 1812; 211 ปีก่อน (1812-10-01)"

Month First (mf) and Day First (df) options[แก้]

The df (day first) and mf (month first) parameters indicate the intended date format to display. The appropriate parameter should be set to "y" or "yes" e.g. df=yes or mf=y.

The default output of this template is to display the month before the day (American format). This default may not be appropriate articles about people from parts of the world where the day precedes the month in a date (British/International format). In such articles the parameter, "df", should be set to display the day before the month.

The parameter "mf", while not actually used by the template, will indicate that month first format is intended. Using these parameters can assist bots or other automated processing to detect which date format is intended; leaving the format as default may lead an editor or bot to change the format to an unintended value.

Do not specify both "df" and "mf" parameters in the same use of the template, as these formats are mutually exclusive.

Examples:

{{Start date and years ago|1993|2|24|df=yes}} displays "24 กุมภาพันธ์ 1993; 31 ปีก่อน (1993-02-24)".
{{Start date and years ago|1993|2|24|df=y}} displays "24 กุมภาพันธ์ 1993; 31 ปีก่อน (1993-02-24)".
{{Start date and years ago|1993|2|24|mf=yes}} displays "24 กุมภาพันธ์ 1993; 31 ปีก่อน (1993-02-24)".
{{Start date and years ago|1993|2|24|mf=y}} displays "24 กุมภาพันธ์ 1993; 31 ปีก่อน (1993-02-24)".

Use in microformats[แก้]

{{Start date and years ago}} also returns the date, hidden by CSS, in the ISO 8601 format needed by hAtom (class="updated"), hCalendar (class="dtstart") and hCard (class="bday") microformats - usually, but not always, within infobox or similar templates, or tables.

Its use in hCard is for organisations, venues and similar; use {{Birth date}} or {{Birth date and age}} for people.

See the microformats project for further details.

Limitation[แก้]

แม่แบบ:UF-datewarn