Templat:Birth-date and age

{{Birth-date and age}} memaparkan tarikh lahir dan umur seseorang. Selain mengira umur orang, manfaat menggunakan templat ini adalah untuk membolehkan kemasukan tarikh microformat tersembunyi, yang boleh diindeks atau dicari oleh alat perisian.
Nota: Templat ini tidak boleh mengira umur dengan betul jika tarikh penuh (bulan, hari, tahun) tidak disediakan. Sebagai contoh, seseorang yang dilahirkan pada tahun 1941 boleh jadi sama 81 or 82, depending on whether they have reached their birthday in the current year:
{{Birth-date and age|1941}}
→ 1941 (age 82){{Birth-date and age|September 1941}}
→ September 1941 (age 82)
When only the year is known, consider using {{Birth year and age}} instead:
{{Birth year and age|1941}}
→ 1941 (umur 81–82){{Birth year and age|1941|9}}
→ September 1941 (umur 81–82)
Kegunaan[sunting sumber]
- Format
{{Birth-date and age| birth date }}
{{Birth-date and age| birth date | wikitext to display in place of 'birth date'. Like the right hand parameter in a wikilink, this could be alternate text, links, templates etc. }}
Contoh[sunting sumber]
Month first format: Sample below displays April 12, 1941, with invisible microformat date: 1941-04-12
(age 82)
|
Day first format: Sample below displays 12 April 1941, with invisible microformat date: 1941-04-12
(age 82)
|
Year only, year and month only: Sample below displays 1941, with invisible microformat date: 1941
(age 82)
|
Demo of ISO date, as well as alternate displays. Sample below displays Twelfth of April, 1941, with invisible microformat date: 1941-04-12
(age 82)
|
Parameters[sunting sumber]
{{birth-date and age|birth date|additional parameters}}
Parameter | Default | ||
---|---|---|---|
(required) | 1 | Birth date. May be year only, year and month, year month and day, expressed in natural formats: e.g.: 24 August 1953, 1955-08-25, Sunday, December 7, 1941. If parameter three is not specified, the birth date is displayed in exactly this format. This value as well as parameter 2 may not include links. If links or templates that do not evaluate as recognizable dates are desired, use parameter 2. | – |
(optional) | 2 | The birth date to display. This may include links or templates, or any combination of them, and overrides parameter 1. | parm 1 |
(optional) | bce | If birth date is BC, set to "b". | – |
(optional) | gregorian | If Julian date is used, this parameter is required. The date provided is used for emitting the correct microformat translation of the birth date. | parm 1 |
(optional) | dt | This value if present is the ISO8601 value emitted to indicate microformat birth date. It overrides any calculated value. | – |
See also[sunting sumber]
Templat:Birth, death and age templates
Pendokumenan di atas ditransklusikan daripada Templat:Birth-date and age/doc. (sunting | sejarah) Para penyunting boleh membuat percubaan di laman kotak pasir (cipta | cermin) dan kes ujian (cipta) templat ini. Sila letakkan kategori di sublaman /doc. Sublaman templat ini. |