Difference between revisions of "Template:Birth, death and age templates"

From blackwiki
Jump to navigation Jump to search
imported>Mrjulesd
(added cat)
imported>Zarex
(Removed the duplicate entry of {{age in years and months}})
 
(9 intermediate revisions by 5 users not shown)
Line 18: Line 18:
 
       |row1style=line-height:1.6em;font-weight:bold;border-bottom:1px solid #aaa;
 
       |row1style=line-height:1.6em;font-weight:bold;border-bottom:1px solid #aaa;
 
       | Template               | {{resize|110%|Description{{\}}use }}
 
       | Template               | {{resize|110%|Description{{\}}use }}
       | {{tl|BirthDeathAge}}      | Combines functions of <nowiki>{{birth date}}, {{birth-date}}, {{birth date and age}}, {{birth year and age}}, {{death date}}, {{death-date}}, {{death date and age}} and {death year and age}}.</nowiki>
+
       | {{tl|BirthDeathAge}}      | Combines functions of <nowiki>{{birth date}}, {{birth-date}}, {{birth date and age}}, {{birth year and age}}, {{death date}}, {{death-date}}, {{death date and age}} and {{death year and age}}.</nowiki>
 
       | {{tl|birth date}}          | To display a birth date and related hidden metadata.
 
       | {{tl|birth date}}          | To display a birth date and related hidden metadata.
 
       | {{tl|birth-date}}          |  
 
       | {{tl|birth-date}}          |  
Line 25: Line 25:
 
       | {{tl|birth-date and age}}  | As {{tlf|birth date and age}} but accepts dates in text form ("15 June 1950", "June 15, 1950", "June 1950", etc).
 
       | {{tl|birth-date and age}}  | As {{tlf|birth date and age}} but accepts dates in text form ("15 June 1950", "June 15, 1950", "June 1950", etc).
 
       | {{tl|birth year and age}}  | Year of birth and approximate age.
 
       | {{tl|birth year and age}}  | Year of birth and approximate age.
       | {{tl|Birth based on age as of date}}  | To display approximate birth year and current age given a particular date (e.g. when a dated reference mentions the age of a person).
+
       | {{tl|birth based on age as of date}}  | To display approximate birth year and current age given a particular date (e.g. when a dated reference mentions the age of a person).
       | {{tl|Birth date based on age at death}} | To display approximate birth year based on age at death.
+
       | {{tl|birth based on age at death}} | To display approximate birth year based on age at death.
 
     }}
 
     }}
 
{{Aligned table|fullwidth=y
 
{{Aligned table|fullwidth=y
Line 35: Line 35:
 
       | {{tl|death date}}          | To display a death date and related hidden metadata.
 
       | {{tl|death date}}          | To display a death date and related hidden metadata.
 
       | {{tl|death-date}}          |  
 
       | {{tl|death-date}}          |  
       | {{tl|death date and age}}  | {{tlf|death date}} with suffix "(aged ''N'')".
+
       | {{tl|death date and age}}  | {{tlf|death date}} with suffix "(aged ''N'')". Also called with {{tlf|event date and age}}
 
       | {{tl|death-date and age}}  | As {{tlf|death date and age}} but accepts dates in text form ("15 June 1950", "June 15, 1950", "June 1950", etc).
 
       | {{tl|death-date and age}}  | As {{tlf|death date and age}} but accepts dates in text form ("15 June 1950", "June 15, 1950", "June 1950", etc).
 
       | {{tl|death date and given age}} | To display a death date and specified age.
 
       | {{tl|death date and given age}} | To display a death date and specified age.
Line 50: Line 50:
 
       |col1style=font-size:110%;white-space:nowrap;padding-right:1.0em;width:18em;
 
       |col1style=font-size:110%;white-space:nowrap;padding-right:1.0em;width:18em;
 
       |row1style=line-height:1.6em;font-weight:bold;border-bottom:1px solid #aaa;
 
       |row1style=line-height:1.6em;font-weight:bold;border-bottom:1px solid #aaa;
       | Template&nbsp;                 | {{resize|110%|Description{{\}}use&nbsp;}}
+
       | Template&nbsp;                   | {{resize|110%|Description{{\}}use&nbsp;}}
 
       | {{tl|age in years, months, weeks and days}} | Number of complete years, months, weeks and days between two dates.
 
       | {{tl|age in years, months, weeks and days}} | Number of complete years, months, weeks and days between two dates.
 
       | {{tl|age in years, months and days}} | Number of complete years, months and days between two dates.
 
       | {{tl|age in years, months and days}} | Number of complete years, months and days between two dates.
       | {{tl|age in years and months}} | Number of complete years and remaining months between two dates.
+
       | {{tl|age in years and months}}   | Number of complete years and remaining months between two dates.
       | {{tl|age in years and days}}   | Number of complete years and remaining days between two dates.
+
       | {{tl|age in years and days}}     | Number of complete years and remaining days between two dates.
       | {{tl|age in days}}            | Age in days between two dates.
+
       | {{tl|age in years and days nts}} | {{tlf|age in years and days}} with output formatted for use in sortable tables.
       | {{tl|age in days nts}}         | {{tlf|age in days}} with output formatted for use in sortable tables.
+
      | {{tl|age in decimal years}}      | Number of years between two dates, rounded to the specified number of decimal places.
 +
      | {{tl|age in years}}              | Number of years between two dates.
 +
      | {{tl|age in years nts}}          | {{tlf|age in years}} with output formatted for use in sortable tables.
 +
      | {{tl|age in months}}            | Number of months between two dates.
 +
      | {{tl|age in weeks and days}}    | Number of weeks and days between two dates.
 +
      | {{tl|age in weeks}}              | Number of weeks between two dates.
 +
      | {{tl|age in days}}              | Age in days between two dates.
 +
       | {{tl|age in days nts}}           | {{tlf|age in days}} with output formatted for use in sortable tables.
 
     }}
 
     }}
 
{{Aligned table|fullwidth=y
 
{{Aligned table|fullwidth=y
Line 62: Line 69:
 
       |col1style=font-size:110%;white-space:nowrap;padding-right:1.0em;width:18em;
 
       |col1style=font-size:110%;white-space:nowrap;padding-right:1.0em;width:18em;
 
       |row1style=line-height:1.6em;font-weight:bold;border-bottom:1px solid #aaa;
 
       |row1style=line-height:1.6em;font-weight:bold;border-bottom:1px solid #aaa;
       | Template&nbsp;         | {{resize|110%|Description{{\}}use&nbsp;}}
+
       | Template&nbsp;       | {{resize|110%|Description{{\}}use&nbsp;}}
 
       | {{tl|age}}            | Age based on number of complete years between two dates.
 
       | {{tl|age}}            | Age based on number of complete years between two dates.
 
       | {{tl|age nts}}        | {{tlf|age}} with output formatted for use in [[Help:Sorting|sortable tables]].
 
       | {{tl|age nts}}        | {{tlf|age}} with output formatted for use in [[Help:Sorting|sortable tables]].
 
       | {{tl|age as of date}} | Current age (in years) from a known age at a specified date.
 
       | {{tl|age as of date}} | Current age (in years) from a known age at a specified date.
 +
      | {{tl|age for infant}} | Current age for infant: months and days up to one year, years and months up to three years, and years beyond.
 
   }}
 
   }}
 
<!----------------------------------------------------------------------------->
 
<!----------------------------------------------------------------------------->
Line 76: Line 84:
 
   |col1style=font-size:110%;white-space:nowrap;padding-right:1.0em;width:18em;
 
   |col1style=font-size:110%;white-space:nowrap;padding-right:1.0em;width:18em;
 
   |row1style=line-height:1.6em;font-weight:bold;border-bottom:1px solid #aaa;
 
   |row1style=line-height:1.6em;font-weight:bold;border-bottom:1px solid #aaa;
   | Template&nbsp;                       | {{resize|110%|Description{{\}}use&nbsp;}}
+
   | Template&nbsp;                     | {{resize|110%|Description{{\}}use&nbsp;}}
 
   | {{tl|start date}} / {{tl|end date}} |  
 
   | {{tl|start date}} / {{tl|end date}} |  
 
   | {{tl|start-date}} / {{tl|end-date}} |  
 
   | {{tl|start-date}} / {{tl|end-date}} |  
   | {{tl|start date and age}}           |  
+
   | {{tl|start date and age}}           |  
   | {{tl|end date and age}}             |  
+
   | {{tl|end date and age}}             |  
 +
  }}
 +
 
 +
<!----------------------------------------------------------------------------->
 +
 
 +
| abbr4 = misc
 +
| section4 = Miscellaneous
 +
| content4 =
 +
{{Aligned table|fullwidth=y
 +
  |style=line-height:1.35em;text-align:left;
 +
  |col1style=font-size:110%;white-space:nowrap;padding-right:1.0em;width:18em;
 +
  |row1style=line-height:1.6em;font-weight:bold;border-bottom:1px solid #aaa;
 +
  | Template&nbsp;                        | {{resize|110%|Description{{\}}use&nbsp;}}
 +
  | {{tl|OldStyleDate<!-- |9 June|1672|30 May -->}}  | Dates pre-1584 in Julian calendar
 
   }}
 
   }}
  
Line 91: Line 112:
 
* [[:Category:Date mathematics templates|Date mathematics templates]]
 
* [[:Category:Date mathematics templates|Date mathematics templates]]
  
}}<noinclude>
+
}}<!--
{{Documentation
 
| content =
 
{{Collapsible sections option |list={{hlist|BDA|age|dates}}}}
 
{{Collapsible option |default=expanded}}
 
  
[[Category:Date mathematics templates| ]]
+
--><noinclude>{{Documentation}}</noinclude>
[[Category:Time, date and calendar templates| ]]
 
[[Category:Documentation see also templates]]
 
}}<!--(end Documentation)-->
 
</noinclude>
 

Latest revision as of 07:22, 12 April 2020

Template documentation[view] [edit] [history] [purge]

Usage

How to manage this template's collapsible groups/sections option
  • This template includes collapsible groups/sections. When it first appears, one of these groups/sections may be set to be visible ("expanded") while the others remain hidden ("collapsed") apart from their titlebars. To achieve this, include the parameter |name where name is one of the following words that identify the groups/sections (omit any speech or quotation marks):
    • BDA
    • age
    • dates

Initial visibility: currently defaults to expanded

To set this template's initial visibility, the |state= parameter may be used:

  • |state=collapsed: {{Birth, death and age templates|state=collapsed}} to show the template collapsed, i.e., hidden apart from its title bar
  • |state=expanded: {{Birth, death and age templates|state=expanded}} to show the template expanded, i.e., fully visible
  • |state=autocollapse: {{Birth, death and age templates|state=autocollapse}}
    • shows the template collapsed to the title bar if there is a {{navbar}}, a {{sidebar}}, or some other table on the page with the collapsible attribute
    • shows the template in its expanded state if there are no other collapsible items on the page

If the |state= parameter in the template on this page is not set, the template's initial visibility is taken from the |default= parameter in the Collapsible option template. For the template on this page, that currently evaluates to expanded.