Template:Birth-date and age/doc

From The Kodiak Republic Wiki
BadSalzdetfurthBadenburgerStr060529.jpg

Template:Tracks Wikidata

{{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 81 or 82, depending on whether they have reached their birthday in the current year:

{{Birth-date and age|1941}} → 1941 (1941) (age 82)
{{Birth-date and age|October 1941}} → October 1941 (1941-10) (age 82)

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

{{Birth year and age|1941}} → 1941 (age 81–82)
{{Birth year and age|1941|10}} → October 1941 (age 81–82)

Usage

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. }}

hCard microformat

This template also returns the date, hidden by CSS, in the ISO 8601 standard.[1] [2] For example:

(<span class="bday">1993-02-24</span>)

Note: For the "foundation", "built" and similar set-up dates of companies, buildings etc., use {{start date}} (this will work for year-only or month-year dates). Because the ISO 8601 standard requires the Gregorian calendar, this template should not be used if the date is given in the Julian calendar.

For further information, visit the microformats project.

Examples

Examples of {{Birth-date and age}} (colors for emphasis only)
Month first format: Sample below displays April 12, 1941 (1941-04-12) (age 82), with invisible microformat date: 1941-04-12
{{Birth-date and age|April 12, 1941}}
Day first format: Sample below displays 12 April 1941 (1941-04-12) (age 82), 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) (age 82), with invisible microformat date: 1941
{{Birth-date and age|1941}}
Demo of ISO date, as well as alternate displays. Sample below displays Twelfth of April, 1941 (1941-04-12) (age 82), 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 (2016-12-31) (age 6)
    31 December 2016<span style="display:none">&#160;(<span class="dtstart bday">2016-12-31</span>)</span> (age&nbsp;<span class="currentage"></span>6)
  • {{Birth date and age|2016|12|31|df=y}} (2016-12-31) 31 December 2016 (age 6)
    <span style="display:none"> (<span class="bday">2016-12-31</span>) </span>31 December 2016<span class="noprint ForceAgeToShow"> (age&nbsp;6)</span>

Parameters

{{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

Alternative template

Tracking categories

See also


  1. Date Design Pattern (April 7, 2013).
  2. hCalendar closed issues (August 28, 2009). Specifically rejects supporting the Julian calendar.
Cookies help us deliver our services. By using our services, you agree to our use of cookies.
https://kodiak.wiki/wiki/Template:Birth-date_and_age/doc
kodiak.wiki
CC-MAIN-2023-40
74296
application/http; msgtype=response
sha1:N5JIFIRCAQL6IH3KU2VDJY3X3BJXAG62
<urn:uuid:c3d7b90c-b4f9-4812-aa45-310a0b6bb0d4>
2023-10-03T03:37:33Z
51.222.14.30
text/html
sha1:IJ23GRI7S4SXDSP4BQAAKBOTHHSFPWIC
<urn:uuid:479196b1-2648-476b-b40e-c2e5b12488dc>
https://kodiak.wiki/wiki/Template:Birth-date_and_age/doc
response
<urn:uuid:d2112697-b3af-42d5-aefc-a69ae87f4e32>
isPartOf: CC-MAIN-2023-40
publisher: Common Crawl
description: Wide crawl of the web for September/October 2023
operator: Common Crawl Admin (info@commoncrawl.org)
hostname: ip-10-67-67-115
software: Apache Nutch 1.19 (modified, https://github.com/commoncrawl/nutch/)
robots: checked via crawler-commons 1.5-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)
format: WARC File Format 1.1
conformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/