Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Search
Search
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Template:Birth based on age as of date/doc
(section)
Template
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Syntax == === Typical use === <syntaxhighlight lang="wikitext"> {{birth based on age as of date | age | year | month | day }} </syntaxhighlight> <div style="margin-left:1.6em;">Code:</div> <div style="margin-left:3.2em;"><code><nowiki>{{birth based on age as of date|50|</nowiki>{{#expr:{{CURRENTYEAR}}-2}}|{{#expr:12-{{CURRENTMONTH}}+1}}|{{CURRENTDAY}}<nowiki>}}</nowiki></code></div> <div style="margin-left:1.6em;">Result:</div> <div style="margin-left:3.2em;">{{birth based on age as of date|50|{{#expr:{{CURRENTYEAR}}-2}}|{{#expr:12-{{CURRENTMONTH}}+1}}|{{CURRENTDAY}}}} </div> The age, year, and day must be supplied as [[natural number]]s; month can be specified as a natural number as well as by name or abbreviation (e.g. "August" or "Aug"). The [[Gregorian calendar]] is assumed, with no special support provided for [[dual dating]] or the difference between [[Old Style and New Style dates]]. If only the publication year for a source is known, the "day" and "month" fields can be omitted. === No age === In some contexts—like the lead sentence of a biography—it may be desirable to show only the birth year, and not a person’s age. To suppress the age field, set {{para|noage|yes}}: <div style="margin-left:1.6em;">Code:</div> <div style="margin-left:3.2em;"><code><nowiki>{{birth based on age as of date|50|</nowiki>{{#expr:{{CURRENTYEAR}}-2}}|{{#expr:12-{{CURRENTMONTH}}+1}}|{{CURRENTDAY}}|noage=1|slash=y<nowiki>}}</nowiki></code></div> <div style="margin-left:1.6em;">Result:</div> <div style="margin-left:3.2em;">{{birth based on age as of date|50|{{#expr:{{CURRENTYEAR}}-2}}|{{#expr:12-{{CURRENTMONTH}}+1}}|{{CURRENTDAY}}|noage=1|slash=yes}}</div> === Separator === In general, the two possible birth years should be written out as: {{xt|1950 or 1951}}. In contexts which are tight for space, the separator between the two possible years should be a slash: {{xt|1950/1951}}. To use the <code>/</code> separator, add {{para|slash|yes}}. <div style="margin-left:1.6em;">Code:</div> <div style="margin-left:3.2em;"><code><nowiki>{{birth based on age as of date|50|</nowiki>{{#expr:{{CURRENTYEAR}}-2}}|{{#expr:12-{{CURRENTMONTH}}+1}}|{{CURRENTDAY}}|slash=yes<nowiki>}}</nowiki></code></div> <div style="margin-left:1.6em;">Result:</div> <div style="margin-left:3.2em;">{{birth based on age as of date|50|{{#expr:{{CURRENTYEAR}}-2}}|{{#expr:12-{{CURRENTMONTH}}+1}}|{{CURRENTDAY}}|slash=yes}}</div>
Summary:
Please note that all contributions to Red Letter Media Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
RLMWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Toggle limited content width