ទំព័រគំរូ​នេះ​ផ្ដល់​លទ្ធផល​អាយុ​រវាង​កាលបរិច្ឆេទ​ពីរ​ជាក់លាក់។ ប្រសិន​បើ​បារ៉ាម៉ែត្រ​ទីពីរ​មិន​ត្រូវ​បាន​ផ្ដល់​ទេ វា​នឹង​ផ្ដល់​លទ្ធផល​អាយុ​រវាង​កាលបរិច្ឆេទ​មួយ​ទៅ​នឹង​កាលបរិច្ឆេទ​បច្ចុប្បន្ន។

កូដ:
{{age|ឆ្នាំ១|ខែ១|ថ្ងៃ១|ឆ្នាំ២|ខែ២|ថ្ងៃ២}} ឬ
{{age|ឆ្នាំ១|ខែ១|ថ្ងៃ១}}
ឧទាហរណ៍:
{{age|1989|7|23|2003|7|14}} ផ្ដល់​លទ្ធផល "13"
{{age|1989|7|23}} ផ្ដល់​លទ្ធផល "34"
នៅ​ពេល​ប្រើ​ទំព័រគំរូ​នេះ​ដើម្បី​គណនា​អាយុ​មនុស្ស​ម្នាក់​នៅ​ពេល​ស្លាប់ ឬ​អាយុ​មនុស្ស​ម្នាក់​ជាមួយ​នឹង​កាលបរិច្ឆេទ​ជាក់លាក់​មួយ (ខុស​ពី​អាយុ​បច្ចុប្បន្ន​របស់​មនុស្ស​ម្នាក់​នោះ) សូម​ប្រើ​កូដ​ខាង​ក្រោម​នេះ​ទៅ​ក្នុង​ទំព័រ។
ឧទាហរណ៍: {{subst:age|1989|7|23|2003|7|14}}
នៅ​ពេល​បញ្ចូល​កាលបរិច្ឆេទ​មុន​សករាជ សូម​ប្រើ​លេខ​ឆ្នាំ​តារាសាស្ត្រ: 1 BCE តំណាង​ឲ្យ 0, 2 BCE តំណាង​ឲ្យ -1, 3 BCE តំណាង​ឲ្យ -2 ។ល។ ឧទាហរណ៍​ដូច​ការបញ្ចេញ​ខាង​ក្រោម​នេះ​នឹង​ផ្ដល់​ចំនួន​ឆ្នាំ​កន្លង​ទៅ​នៃ​សង្គ្រាម​នៅ​ទីក្រុង​កាន ប្រទេស​អ៊ីតាលី (battle of Cannae) ដែល​ចាប់ផ្ដើម​នៅ​ថ្ងៃ២ ខែ​សីហា ឆ្នាំ២១៦ មុន​គ្រិស្ត​សករាជ:
{{age|-215|8|2}} ផ្ដល់​លទ្ធផល "2238"
ចំណាំ:
ទំព័រ​គំរូ​នេះ​មិន​ពិនិត្យ​ការ​បញ្ចូល​ខុស​ទេ:
{{age|1980|7|14|1993|6|233}} ផ្ដល់​លទ្ធផល "12" (ថ្ងៃ​ដែល​លើស​មិន​ត្រូវ​រាប់​ជា​ខែ​បន្ថែម​ទេ)
{{age|1980|7|14|1993|88|14}} ផ្ដល់​លទ្ធផល "13" (ខែ​ដែល​លើស​មិន​ត្រូវ​រាប់​ជា​ឆ្នាំ​បន្ថែម​ទេ)

ទិន្នន័យ​ទំព័រគំរូ កែប្រែ

This is the TemplateData documentation for the template used by the new VisualEditor.

Age

ទំព័រគំរូ​នេះ​ផ្ដល់​លទ្ធផល​អាយុ​រវាង​កាលបរិច្ឆេទ​ពីរ​ជាក់លាក់។ ប្រសិន​បើ​បារ៉ាម៉ែត្រ​ទីពីរ​មិន​ត្រូវ​បាន​ផ្ដល់​ទេ វា​នឹង​ផ្ដល់​លទ្ធផល​អាយុ​រវាង​កាលបរិច្ឆេទ​មួយ​ទៅ​នឹង​កាលបរិច្ឆេទ​បច្ចុប្បន្ន។

Template parameters

ParameterDescriptionTypeStatus
ឆ្នាំ (ចាប់ពី)year1 1

ឆ្នាំ​នៃ​កាលបរិច្ឆេទ​ដំបូង

Numberrequired
ខែ (ចាប់ពី)month1 2

ខែ​នៃ​កាល​បរិច្ឆេទ​ដំបូង

Numberrequired
ថ្ងៃ (ចាប់ពី)day1 3

ថ្ងៃ​នៃ​កាល​បរិច្ឆេទ​ដំបូង

Numberrequired
ឆ្នាំ (ទៅ​ដល់)year2 4

ឆ្នាំ​នៃ​កាល​បរិច្ឆេទ​ទៅដល់, បើ​ត្រូវ​ការ

Numberoptional
ខែ (ទៅដល់)month2 5

ខែ​នៃ​កាល​បរិច្ឆេទ​ទៅដល់, បើ​ត្រូវ​ការ

Numberoptional
ថ្ងៃ (ទៅដល់)day2 6

ថ្ងៃ​នៃ​កាល​បរិច្ឆេទ​ទៅដល់, បើ​ត្រូវ​ការ

Numberoptional

See also កែប្រែ

Birth, death, age
{{BirthDeathAge}} – carries out the functions of this template and all the following ones
{{Birth date}} – displays the date and related hidden metadata
{{Birth date and age2}} – displays birth date, plus age as of a specified date, "(aged ##)" appears after the birth date
{{Birth year and age}} – year of birth and approximate age
{{Birth-date and age}} – display birth date and age, accepts dates as text (15 June 1950; June 15, 1950; June 1950; etc.)
{{Birth based on age as of date}} – displays approximate birth year and current age; used when a dated reference mentions the age of a person as of the date of publication
{{Death date}} – displays the date and related hidden metadata
{{Death date and age}} – same as {{Death date}}, except that "(aged ##)" appears after the death date
{{Death year and age}} – year of death and approximate age at death
{{Death-date and age}} – display death date and age, accepts date as text (15 June 1950; June 15, 1950; June 1950; etc.)
Age only
{{Age}} – age based on the number of full years between two dates (or a specified date and current date)
{{Age nts}} – similar to the above, but will sort correctly in sortable tables
{{Age in years and days}} – full years and days between two dates (or a specified date and current date)
{{Age in days}} – age in days between two dates (or a specified date and current date)
{{Age as of date}} – current age in years, based on a known age as of a specified date