Jump to content

සැකිල්ල:උපන් දින හා වයස/ලේඛය

විකිපීඩියා වෙතින්

{{Birth-date and age}} displays a person’s birth date and age. Besides calculating the age of the person, the benefit of using this template is to allow for the inclusion of hidden microformat dates, which may be indexed or searched by software tools.

Note: The template may not calculate the age correctly if a full date (month, day, year) is not provided. For example, a person who was born in 1941 could be either 82 or 83, depending on whether they have reached their birthday in the current year:

{{Birth-date and age|1941}}ප්‍රකාශන දෝෂය: හඳුනානොගත් විරාම සංකේතය "{", 1941 (1941-{{{month}}}-{{{day}}}) (වයස Error: Need valid year, month, day)
{{Birth-date and age|නොවැම්බර් 1941}}ප්‍රකාශන දෝෂය: හඳුනානොගත් විරාම සංකේතය "{", නොවැම්බර් 1941 (නොවැම්බර් 1941-{{{month}}}-{{{day}}}) (වයස Error: Need valid year, month, day)

When only the year is known, consider using {{Birth year and age}} instead:

{{Birth year and age|1941}} → 1941 (වයස 82–83)
{{Birth year and age|1941|11}} → නොවැම්බර් 1941 (වයස 82–83)
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. }}
Examples of {{Birth-date and age}} (colors for emphasis only)
Month first format: Sample below displays ප්‍රකාශන දෝෂය: හඳුනානොගත් විරාම සංකේතය "{", April 12, 1941 (April 12, 1941-{{{month}}}-{{{day}}}) (වයස Error: Need valid year, month, day), with invisible microformat date: 1941-04-12
{{Birth-date and age|April 12, 1941}}
Day first format: Sample below displays ප්‍රකාශන දෝෂය: හඳුනානොගත් විරාම සංකේතය "{", 12 April 1941 (12 April 1941-{{{month}}}-{{{day}}}) (වයස Error: Need valid year, month, day), with invisible microformat date: 1941-04-12
{{Birth-date and age|12 April 1941}}
Year only, year and month only: Sample below displays ප්‍රකාශන දෝෂය: හඳුනානොගත් විරාම සංකේතය "{", 1941 (1941-{{{month}}}-{{{day}}}) (වයස Error: Need valid year, month, day), with invisible microformat date: 1941
{{Birth-date and age|1941}}
Demo of ISO date, as well as alternate displays. Sample below displays ප්‍රකාශන දෝෂය: හඳුනානොගත් විරාම සංකේතය "{", 1941-04-12 (1941-04-12-Twelfth of April, 1941-{{{day}}}) (වයස Error: Need valid year, month, day), with invisible microformat date: 1941-04-12
{{Birth-date and age|1941-04-12|Twelfth of April, 1941}}

Microformat output

[සංස්කරණය]

Birth date and age templates:

  • {{Birth-date and age|31 December 2016}}ප්‍රකාශන දෝෂය: හඳුනානොගත් විරාම සංකේතය "{", 31 December 2016 (31 December 2016-{{{month}}}-{{{day}}}) (වයස Error: Need valid year, month, day)
    <strong class="error">ප්‍රකාශන දෝෂය: හඳුනානොගත් විරාම සංකේතය &quot;{&quot;</strong>, 31 December 2016<span style="display:none"> (<span class="bday">31 December 2016-{{{month}}}-{{{day}}}</span>)</span><span class="noprint"> (වයස&nbsp;<strong class="error">Error: Need valid year, month, day</strong>)</span>
  • {{Birth date and age|2016|12|31|df=y}} → 31 දෙසැම්බර් 2016 (2016-12-31) (වයස 7)
    31 දෙසැම්බර් 2016<span style="display:none"> (<span class="bday">2016-12-31</span>)</span><span class="noprint"> (වයස&nbsp;<span class="currentage"></span>7)</span>
{{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.

Supporting templates

[සංස්කරණය]

Tracking categories

[සංස්කරණය]