Difference between revisions of "Template:Days since"

From blackwiki
Jump to navigation Jump to search
imported>Mdaniels5757
(temp. screw up format for documentation, will fix)
imported>Mdaniels5757
m (create documentation subpage)
 
Line 14: Line 14:
 
}}
 
}}
 
}}<noinclude>
 
}}<noinclude>
 
+
{{Documentation}}
{{documentation|content=
+
<!-- Add categories to the /doc subpage, interwikis to Wikidata, not here -->
'''{{tl|Days since}}''' shows the years/days (or months/days) since a specific date, entered in the 3-number format: year{{!}}month{{!}}day.
+
</noinclude>
 
 
== See also ==
 
* [[Template:Birth date and age]] – show birthdate and age in years
 
* [[Template:Years and days]] – show years and days for a count in days
 
}}{{Sandbox other|<!-- Absolutely nothing. -->|
 
[[Category:Date-computing templates based on current time]]
 
}}
 
{{TemplateData header}}
 
<templatedata>
 
{
 
"params": {
 
"1": {
 
"description": "Year",
 
"type": "number",
 
"required": true
 
},
 
"2": {
 
"description": "Month",
 
"type": "number",
 
"required": true
 
},
 
"3": {
 
"description": "Day",
 
"type": "number",
 
"required": true
 
},
 
"short": {
 
"description": "Uses \"d\" or \"m\" instead of \"months\" or \"days\" if set to \"yes\"",
 
"type": "string"
 
}
 
},
 
"description": "Shows the years/days (or months/days) since the entered date.",
 
"paramOrder": [
 
"1",
 
"2",
 
"3",
 
"short"
 
],
 
"format": "inline"
 
}
 
</templatedata></noinclude>
 

Latest revision as of 20:57, 2 May 2020

14 years, 189 days

Template documentation[view] [edit] [history] [purge]

{{Days since}} shows the years/days (or months/days) since a specific date.

Usage

{{Days since|2025|01|01}} produces: 8 months ago

{{Days since|2025|01|01|short=yes}} produces: 8m

Template data

This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.

TemplateData for Days since

Shows the years/days (or months/days) since the entered date.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
11

Year

Numberrequired
22

Month

Numberrequired
33

Day

Numberrequired
Shortshort

Uses "d" or "m" instead of "months" or "days" if set to "yes"

Stringoptional

See also