Jump to content

Template:Start and end dates and age/doc: Difference between revisions

From the Vrienden Universe, a fictional wiki
Created page with "== When not to use this template == Do not use this template for: * dates that are uncertain e.g., "before 4 April 1933"; "around 18 November 1939". * dates outside the range given under below. * other, secondary dates * outside -emitting templates—if in doubt, see the parent template's documentation * more than one date in any parent template == Usage == {{tlx|Start and end dates and age|{{var|YYYY}}|{{var|MM}}|{{var|DD}}|{{var|YYYY}}|{{var|MM}}|{{var|DD}}|{{var|ag..."
 
Remove imported Wikipedia TemplateData metadata
 
(One intermediate revision by the same user not shown)
Line 18: Line 18:
* Present range: {{tlx|Start and end dates and age|1939|9|1|present|_show_result=yes}}
* Present range: {{tlx|Start and end dates and age|1939|9|1|present|_show_result=yes}}


== TemplateData ==
 
{{TemplateData header}}
<templatedata>
{
"description": "Date that an event or entity started or was created and when it ended or was destroyed",
"params": {
"1": {
"label": "YYYY",
"description": "Start year",
"example": "1939",
"type": "number",
"required": true
},
"2": {
"label": "MM",
"description": "Start month",
"example": "9",
"type": "number"
},
"3": {
"label": "DD",
"description": "Start day of month",
"example": "1",
"type": "number"
},
"4": {
"label": "YYYY",
"description": "end year",
"example": "1945",
"type": "number"
},
"5": {
"label": "MM",
"description": "End month",
"example": "9",
"type": "number"
},
"6": {
"label": "DD",
"description": "End day of month",
"example": "2",
"type": "number"
},
        "7": {
"label": "agein",
"description": "Unites used for listing the age, such as years (y), months (m), weeks (w), and days (d)",
"example": "ymwd",
"type": "string"
},
        "8": {
"label": "formatting",
"description": "Formatting to be placed between the dates and the age, such as spacing or a line break",
"example": "<br/>",
"type": "string"
},
"df": {
"label": "Day first",
"description": "Set to 'yes' to show the day before the month name",
"type": "line",
"suggestedvalues": [
"yes",
"y"
]
}
}
}
</templatedata>


== Use in microformats ==
== Use in microformats ==
{{UF-date-part}}


== Tracking categories ==
== Tracking categories ==

Latest revision as of 13:01, 13 September 2026

When not to use this template

[edit source]

Do not use this template for:

  • dates that are uncertain e.g., "before 4 April 1933"; "around 18 November 1939".
  • dates outside the range given under below.
  • other, secondary dates
  • outside -emitting templates—if in doubt, see the parent template's documentation
  • more than one date in any parent template

{{tlx|Start and end dates and age|YYYY|MM|DD|YYYY|MM|DD|agein|formatting}

Examples

[edit source]
  • Standard: {{Start and end dates and age|1939|9|1|1945|9|2}} → September 1, 1939 – September 2, 1945 (1939-09-01 – 1945-09-02) (6 years and 1 day)
  • Day first: {{Start and end dates and age|1939|9|1|1945|9|2|df=yes}} → 1 September 1939 – 2 September 1945 (1939-09-01 – 1945-09-02) (6 years and 1 day)
  • Same year: {{Start and end dates and age|1939|9|1|1939|10|2}} → September 1 – October 2, 1939 (1939-09-01 – 1939-10-02) (1 month and 1 day)
  • Same month and year: {{Start and end dates and age|1939|9|1|1939|9|2}} → September 1–2, 1939 (1939-09-01 – 1939-09-02) (1 day)
  • Present range: {{Start and end dates and age|1939|9|1|present}} → September 1, 1939 – present (1939-09-01 – present) (Error: Second date should be year, month, day)


Use in microformats

[edit source]

Tracking categories

[edit source]

See also

[edit source]