Module:Age range/doc
Jump to navigation
Jump to search
| icon | This is a documentation subpage for Module:Age range. It may contain usage information, categories and other content that is not part of the original module page. |
Purpose
[edit source]This module provides a simple way to display an automatically updating age range when only an approximate birth year is known (e.g. "1991/1992"). It is designed to be used when the exact year of birth is uncertain but falls within a known range of two consecutive years.
Usage
[edit source]Invoke the module using:
{{#invoke:Age range|ageRange|<earlier year>|<later year>}}
Example:
Born 1991/1992 (age {{#invoke:Age range|ageRange|1991|1992}})
As of 2026, this would output:
Born 1991/1992 (age 33–34)
Parameters
[edit source]1– The earlier possible year of birth (e.g.1991)2– The later possible year of birth (e.g.1992)
Returns
[edit source]A string in the format:
33if both years produce the same age33–34if the years produce a range of ages
Examples
[edit source]| Wikitext | Output (as of 2026) |
|---|---|
36 |
36 |
34–35 |
34–35 |
40–41 |
40–41 |
See also
[edit source]- Module:Age – for precise age calculation
- Template:Birth date – for exact known birthdates
Notes
[edit source]- This module assumes birth has already occurred this year.
- Does not account for specific months or days.
- Use only when the birth year is narrowed to two possibilities.
Module code
[edit source]See Module:Age range for implementation.