Home
Random
Log in
Settings
About The Republic Wiki
Disclaimers
The Republic Wiki
Search
Editing
Template:Start date and age/doc
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!
{{Documentation subpage}} <!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE --> {{High-use}} {{COinS safe|n}} {{Template shortcut|sda}} {{Lua|Module:Check for unknown parameters|Module:Date time}} {{tlb|Start date and age}} displays the date that an event or entity started or was created. It also includes a duplicate, machine-readable date in the [[ISO 8601]] format (which is hidden by [[CSS]]), for use inside other templates which emit [[microformat]]s. The hidden date degrades gracefully when CSS is not available. == Usage == * {{tlx|Start date and age|{{var|YYYY}}|{{var|MM}}|{{var|DD}}}} (year, month, and day) * {{tlx|Start date and age|{{var|YYYY}}|{{var|MM}}|{{var|DD}}|df{{=}}yes}} * {{tlx|Start date and age|{{var|YYYY}}|{{var|MM}}|{{var|DD}}|df{{=}}yes|p{{=}}yes|br{{=}}yes}} == Parameters == {| class="wikitable" ! Parameter ! Status ! Description |- | {{para|1}} | required | A four-digit number indicating the year. |- | {{para|2}} | optional | A number between 1 and 12 indicating the month (leading zeros in the number are ignored). |- | {{para|3}} | optional | A number between 1 and 31 indicating the day of the month (leading zeros in the number are ignored). |- | {{para|df}} | optional | When set to {{para|df|yes}} or {{para|df|y}} displays the day before the month (e.g. "7 November 2004" instead of the default "November 7, 2004"). |- | {{para|p}}<br/> {{para|paren}} | optional | When set to {{para|p|yes}} or {{para|p|y}} the age will be displayed within parentheses. When this parameter is not included, the date and age are separated by a semicolon and a breaking space. |- | {{para|br}} | optional | When set to {{para|br|yes}} or {{para|br|y}} a line break will be inserted between the date and the age. When this parameter is not included, a breaking space will be inserted between the date and the age. This does not change the separating characters between the date and age which are either a semicolon (default setting) or parentheses (if {{para|p|yes}}). |} == Examples == === Default separator: semicolon === {| class="wikitable" style="width:100%;" ! style="width:60%;" | Syntax ! style="width:40%;" | Result |- |colspan="2" style="background-color:#DDD" | '''Full date (year, month, day)''' |- | {{tlx|Start date and age|2010|01|02}} | {{Start date and age|2010|01|02}} |- | {{tlx|Start date and age|2010|1|2|df{{=}}yes}} | {{Start date and age|2010|1|2|df=yes}} |- | {{tlx|Start date and age|2008|01|9|df{{=}}y}} | {{Start date and age|2008|01|9|df=y}} |- | 100 days ago:<br />{{tlx|Start date and age|{{#time:Y|now-100 days}}|{{#time:n|now-100 days}}|{{#time:j|now-100 days}}}} | {{Start date and age|{{#time:Y|now-100 days}}|{{#time:n|now-100 days}}|{{#time:j|now-100 days}}}} |- | Yesterday:<br />{{tlx|Start date and age|{{#time:Y|now-1 days}}|{{#time:n|now-1 days}}|{{#time:j|now-1 days}}}} | {{Start date and age|{{#time:Y|now-1 days}}|{{#time:n|now-1 days}}|{{#time:j|now-1 days}}}} |- | Today:<br />{{tlx|Start date and age|{{#time:Y|now}}|{{#time:n|now}}|{{#time:j|now}}}} | {{Start date and age|{{#time:Y|now}}|{{#time:n|now}}|{{#time:j|now}}}} |- |colspan="2" style="background-color:#DDD" | '''Year and month''' |- | {{tlx|Start date and age|2001|9}} | {{Start date and age|2001|9}} |- | {{tlx|Start date and age|2002|09}} | {{Start date and age|2002|09}} |- |colspan="2" style="background-color:#DDD" | '''Year only''' |- | {{tlx|Start date and age|2005}} | {{Start date and age|2005}} |} === Optional separator: parentheses === {| class="wikitable" style="width:100%;" ! style="width:60%;" | Syntax ! style="width:40%;" | Result |- |colspan="2" style="background-color:#DDD" | '''Full date (year, month, day)''' |- | {{tlx|Start date and age|2003|02|15|p{{=}}yes}} | {{Start date and age|2003|02|15|p=yes}} |- | {{tlx|Start date and age|2003|02|15|df{{=}}y|p{{=}}y}} | {{Start date and age|2003|02|15|df=y|p=yes}} |- |colspan="2" style="background-color:#DDD" | '''Year and month''' |- | {{tlx|Start date and age|2003|02|p{{=}}y}} | {{Start date and age|2003|02|p=y}} |- |colspan="2" style="background-color:#DDD" | '''Year only''' |- | {{tlx|Start date and age|2003|paren{{=}}yes}} | {{Start date and age|2003|paren=yes}} |} === Line break with semicolon === {| class="wikitable" style="width:100%;" ! style="width:60%;" | Syntax ! style="width:40%;" | Result |- |colspan="2" style="background-color:#DDD" | '''Full date (year, month, day)''' |- | {{tlx|Start date and age|2003|02|15|br{{=}}yes}} | {{Start date and age|2003|02|15|br=yes}} |- | {{tlx|Start date and age|2003|02|15|df{{=}}y|br{{=}}y}} | {{Start date and age|2003|02|15|df=y|br=y}} |- |colspan="2" style="background-color:#DDD" | '''Year and month''' |- | {{tlx|Start date and age|2003|02|br{{=}}y}} | {{Start date and age|2003|02|br=y}} |- |colspan="2" style="background-color:#DDD" | '''Year only''' |- | {{tlx|Start date and age|2003|br{{=}}yes}} | {{Start date and age|2003|br=yes}} |} === Line break with parentheses === {| class="wikitable" style="width:100%;" ! style="width:60%;" | Syntax ! style="width:40%;" | Result |- |colspan="2" style="background-color:#DDD" | '''Full date (year, month, day)''' |- | {{tlx|Start date and age|2003|02|15|p{{=}}yes|br{{=}}yes}} | {{Start date and age|2003|02|15|p=yes|br=yes}} |- | {{tlx|Start date and age|2003|02|15|df{{=}}y|p{{=}}y|br{{=}}y}} | {{Start date and age|2003|02|15|df=y|p=y|br=y}} |- |colspan="2" style="background-color:#DDD" | '''Year and month''' |- | {{tlx|Start date and age|2003|02|p{{=}}y|br{{=}}y}} | {{Start date and age|2003|02|p=y|br=y}} |- |colspan="2" style="background-color:#DDD" | '''Year only''' |- | {{tlx|Start date and age|2003|paren{{=}}yes|br{{=}}yes}} | {{Start date and age|2003|paren=yes|br=yes}} |} ==TemplateData == {{collapse top|[[Wikipedia:TemplateData|TemplateData]] documentation used by [[Wikipedia:VisualEditor|VisualEditor]] and other tools}} {{TemplateData header|noheader=1}} <templatedata> { "params": { "1": { "label": "Year", "description": "A four-digit number indicating the year", "example": "2017", "type": "number", "required": true }, "2": { "label": "Month", "description": "A number between 1 and 12 indicating the month", "example": "12", "type": "number", "suggested": true }, "3": { "label": "Day", "description": "A number between 1 and 31 indicating the day of the month", "example": "31", "type": "number", "suggested": true }, "df": { "label": "Display date first", "description": "Set to 'yes' to show the day before the month name", "type": "line", "suggestedvalues": [ "yes", "y" ] }, "paren": { "aliases": [ "p" ], "label": "Display with parentheses", "description": "Set to 'yes' to display the age within parentheses. When this parameter is not included, the date and age are separated by a semicolon and a breaking space.", "type": "line", "suggestedvalues": [ "yes", "y" ] }, "br": { "label": "Line break between date and age", "description": "Set to 'yes' to add a line break between the date and the age. When this parameter is not included, a breaking space will be inserted between the date and the age. This does not change the separating characters between the date and age which are either a semicolon (default setting) or parentheses (if paren=yes).", "type": "line", "suggestedvalues": [ "yes", "y" ] } }, "description": "The Start date and age template displays the date that an event or entity started or was created." } </templatedata> {{collapse bottom}} == Use in microformats == {{UF-date-part}} === Example === {{nowiki template demo|format=inline|output=nowiki+|code=<nowiki>{{Start date and age|2016|12|31}}</nowiki>}} ==Usage in articles== This template is most often used in infoboxes in articles about buildings or organizations, identifying when they were started/founded/opened or dissolved/ended/closed. It has also been used for naval ships to indicate their commissioned age; however, several Wikipedia editors have reverted such edits. Use of this template in ship articles is therefore not recommended. == Tracking categories == * {{clc|Pages using start date and age with unknown parameters}} == See also == * {{tl|Start date}} * {{tl|End date and age}} * {{tl|Time ago}} and {{tl|Years or months ago}} * {{tl|Age}} {{Birth, death and age templates|dates}} <includeonly>{{Sandbox other| | <!-- Categories go here and interwikis go in Wikidata --> [[Category:Date-computing templates based on current time]] }}</includeonly>
Summary:
Please note that all contributions to The Republic Wiki are considered to be released under the Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) (see
The Republic Wiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, 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.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Aligned table
(
edit
)
Template:Birth, death and age templates
(
edit
)
Template:COinS safe
(
edit
)
Template:Category link with count
(
edit
)
Template:Clc
(
edit
)
Template:Collapse bottom
(
edit
)
Template:Collapse top
(
edit
)
Template:Collapse top/styles.css
(
edit
)
Template:Documentation subpage
(
edit
)
Template:High-use
(
edit
)
Template:Hlist/styles.css
(
edit
)
Template:Ifsubst
(
edit
)
Template:Lua
(
edit
)
Template:MONTHNAME
(
edit
)
Template:MONTHNUMBER
(
edit
)
Template:Main other
(
edit
)
Template:Mbox
(
edit
)
Template:Navbox with collapsible groups
(
edit
)
Template:No redirect
(
edit
)
Template:Nowiki template demo
(
edit
)
Template:Ombox
(
edit
)
Template:Para
(
edit
)
Template:Plainlist/styles.css
(
edit
)
Template:Resize
(
edit
)
Template:Sandbox other
(
edit
)
Template:Start date and age
(
edit
)
Template:Strong
(
edit
)
Template:TemplateData header
(
edit
)
Template:Template link
(
edit
)
Template:Template link expanded
(
edit
)
Template:Template link with bold
(
edit
)
Template:Template link with link off
(
edit
)
Template:Template other
(
edit
)
Template:Template parameter usage
(
edit
)
Template:Template shortcut
(
edit
)
Template:Terminate sentence
(
edit
)
Template:Time ago
(
edit
)
Template:Tl
(
edit
)
Template:Tlb
(
edit
)
Template:Tlx
(
edit
)
Template:Trim
(
edit
)
Template:UF-date-part
(
edit
)
Template:UF-date-warn
(
edit
)
Template:Var
(
edit
)
Template:Years or months ago
(
edit
)
Template:Yesno
(
edit
)
Template:Yesno-no
(
edit
)
Template:\
(
edit
)
Module:Aligned table
(
edit
)
Module:Arguments
(
edit
)
Module:Check for unknown parameters
(
edit
)
Module:Date
(
edit
)
Module:High-use
(
edit
)
Module:List
(
edit
)
Module:Lua banner
(
edit
)
Module:Message box
(
edit
)
Module:Message box/configuration
(
edit
)
Module:Message box/ombox.css
(
edit
)
Module:Navbar
(
edit
)
Module:Navbar/configuration
(
edit
)
Module:Navbar/styles.css
(
edit
)
Module:Navbox
(
edit
)
Module:Navbox/configuration
(
edit
)
Module:Navbox/styles.css
(
edit
)
Module:Protect
(
edit
)
Module:Redirect
(
edit
)
Module:Shortcut
(
edit
)
Module:Shortcut/config
(
edit
)
Module:Shortcut/styles.css
(
edit
)
Module:String
(
edit
)
Module:TableTools
(
edit
)
Module:Template invocation
(
edit
)
Module:Template link general
(
edit
)
Module:Template test case
(
edit
)
Module:Template test case/config
(
edit
)
Module:Template test case/data
(
edit
)
Module:Text
(
edit
)
Module:Text/data
(
edit
)
Module:Time ago
(
edit
)
Module:Transclusion count
(
edit
)
Module:Transclusion count/data/S
(
edit
)
Module:Yesno
(
edit
)