yoohoo! hot sauce please
10:27, 7 September 2026 (UTC)
Editing
Template:Start date and age/doc
From 2swagg wiki
Jump to navigation
Jump to search
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>}} == 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 2swagg 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
2swagg wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Page actions
Template
Discussion
Read
Edit source
History
Page actions
Template
Discussion
More
Tools
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Search
janny
Noticeboard
Tools
What links here
Related changes
Special pages
Page information