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 source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit source
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!
== Examples == If, for example, a reference dated July 4, {{#expr:{{CURRENTYEAR}}-2}} mentions that someone is 50 years old, that person's birth year and age can be rendered using: <div style="margin-left:1.6em;"><code><nowiki>{{birth based on age as of date|50|</nowiki>{{#expr:{{CURRENTYEAR}}-2}}|July|4}}</code></div> {| class="plainlinksneverexpand" style="margin-top:0;" !style="border:1px solid #aaa;background:#dfd;"| The following examples are for a person reported as being 50 years old in {{#expr:{{CURRENTYEAR}}-1}} |- | {{Aligned table |class=wikitable |colstyle=padding-right:1.0em; |col1style=font-family:monospace;padding-right:1.0em; |row1header=on| {{sans-serif|Template code}} | Result | {{braces|birth based on age as of date|50|{{#expr:{{CURRENTYEAR}}-1}}|{{CURRENTMONTH}}|{{CURRENTDAY}}}} | {{birth based on age as of date|50|{{#expr:{{CURRENTYEAR}}-1}}|{{CURRENTMONTH}}|{{CURRENTDAY}}}} | {{braces|birth based on age as of date|50|{{#expr:{{CURRENTYEAR}}-1}}|{{CURRENTMONTHNAME}}|{{CURRENTDAY}}}} | {{birth based on age as of date|50|{{#expr:{{CURRENTYEAR}}-1}}|{{CURRENTMONTHNAME}}|{{CURRENTDAY}}}} | {{braces|birth based on age as of date|50|{{#expr:{{CURRENTYEAR}}-1}}|12|31}} | {{birth based on age as of date|50|{{#expr:{{CURRENTYEAR}}-1}}|12|31}} | {{braces|birth based on age as of date|50|{{#expr:{{CURRENTYEAR}}-1}}|Jan|1}} | {{birth based on age as of date|50|{{#expr:{{CURRENTYEAR}}-1}}|Jan|1}} | {{braces|birth based on age as of date|50|{{#expr:{{CURRENTYEAR}}-1}}|12|31|noage{{=}}1}} | {{birth based on age as of date|50|{{#expr:{{CURRENTYEAR}}-1}}|12|31|noage=1}} | {{braces|birth based on age as of date|50|{{#expr:{{CURRENTYEAR}}-1}}|Jan|1|noage{{=}}1}} | {{birth based on age as of date|50|{{#expr:{{CURRENTYEAR}}-1}}|Jan|1|noage=1}} | {{braces|birth based on age as of date|50|{{#expr:{{CURRENTYEAR}}-1}}|{{CURRENTMONTHNAME}}}} | {{birth based on age as of date|50|{{#expr:{{CURRENTYEAR}}-1}}|{{CURRENTMONTHNAME}}}} | {{braces|birth based on age as of date|50|{{#expr:{{CURRENTYEAR}}-1}}|Jan}} | {{birth based on age as of date|50|{{#expr:{{CURRENTYEAR}}-1}}|Jan}} | {{braces|birth based on age as of date|50|{{#expr:{{CURRENTYEAR}}-1}}|12}} | {{birth based on age as of date|50|{{#expr:{{CURRENTYEAR}}-1}}|12}} | {{braces|birth based on age as of date|50|{{#expr:{{CURRENTYEAR}}-1}}}} | {{birth based on age as of date|50|{{#expr:{{CURRENTYEAR}}-1}}}} }} |} {{Birth, death and age templates |BDA}} <includeonly>{{Sandbox other| | <!--PLEASE ADD CATEGORIES BELOW THIS LINE: --> [[Category:Date mathematics templates]] }}</includeonly> <templatedata> { "params": { "1": { "label": "Age", "description": "Age of subject at date of reference's publication.", "example": "55", "type": "number", "required": true }, "2": { "label": "Year", "description": "Year of publication of reference.", "example": "1950", "type": "number", "required": true }, "3": { "label": "Month", "description": "Month of publication of reference.", "example": "8 or August", "type": "string", "suggested": true }, "4": { "label": "Day", "description": "Day of publication of reference.", "example": "21", "type": "number", "suggested": true }, "noage": { "label": "Hide age", "description": "Set to a value of 'yes' to display year of birth without the age", "example": "1", "type": "boolean", "default": "no (i.e., the default is to show the age)" }, "slash": { "label": "Slash separator", "description": "Set to 'yes' to separate years with a '/' for tight spaces (e.g., table cells)", "suggestedvalues": [ "yes" ], "type": "boolean", "default": "no" } }, "description": "This template calculates the birth year and current age based on the age as of a date.", "format": "inline", "paramOrder": [ "1", "2", "3", "4", "noage", "slash" ] } </templatedata>
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