ទំព័រគំរូ: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[កែប្រែ]

Examples
Syntax Display
{{Start date and years ago|2009|4|11}} April 11, 2009 (2009-04-11) (14 years ago)
{{Start date and years ago|2007|4|11}} April 11, 2007 (2007-04-11) (16 years ago)
{{Start date and years ago|1812|10|21}} October 21, 1812 (1812-10-21) (211 years ago)
October 1, 1812 (1812-10-01) (211 years ago)

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
Syntax Display
{{Start date and years ago|1993|2|24|df=yes}} 24 February 1993 (1993-02-24) (31 years ago)
{{Start date and years ago|1993|2|24|df=y}} 24 February 1993 (1993-02-24) (31 years ago)
{{Start date and years ago|1993|2|24|mf=yes}} February 24, 1993 (1993-02-24) (31 years ago)
{{Start date and years ago|1993|2|24|mf=y}} February 24, 1993 (1993-02-24) (31 years ago)

Hard return[កែប្រែ]

When you want the "(# years ago)" to start at the next line rather than letting it soft-returns, use the "br=1" parameter to hard-return it.

Example
Syntax Display
{{Start date and years ago|1993|2|24|br=1}} February 24, 1993 (1993-02-24)
(31 years ago)

Use in microformats[កែប្រែ]

This template also returns the date, hidden by CSS, in the ISO 8601 format needed by one or more of the following 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.

Similarly, {{End date}} returns the date as hCalendar's (class="dtend").

See the microformats project for further details.

Limitation[កែប្រែ]

ទំ.គំរូនេះគ្មានការទុកបម្រុងដើម្បីស្រាយជាមួយប្រតិទិនមិនមែនជាក្រេកូរី។ ទៀតសោត ISO 8601 ទាមទារឲ្យមានការព្រមព្រៀងទៅវិញទៅមកក្នុងចំណោមព័ត៌មានផ្លាស់ប្ដូរគ្នាមុននឹងការប្រើឆ្នាំក្រៅខ្ទង់ចន្លោះ ស.ស 1583–9999 ។ ដូចនេះការប្រើប្រាស់ទំ.គំរូនេះសម្រាប់ប្រតិទិនមិនមែនជាក្រេកូរី ឬកាលបរិ.ក្រៅខ្ទង់នោះតាំងបង្កើតជាអំំណះអំណាង "មិនពិត" នៃការអនុលោមទៅតាមបទដ្ឋាន ISO 8601 ។

អ្នកកែប្រែជួបប្រទះនឹងប.បម្រាស់នេះគួរប្ដូរកាលបរិ.ទៅជាពាក្យពេជន៍លាត គ្មានទំ.គំរូ ឬបើមិនមានទំនុកចិត្តក្នុងការធ្វើដូច្នេះ លើកឡើងនូវវិបាកនៅលើទំ.សន្ទនារបស់ទំ.គំរូនេះ។

See the microformats project for further details.