Difference between revisions of "Template:Days since/doc"

From blackwiki
Jump to navigation Jump to search
imported>Mdaniels5757
(create doc)
 
imported>Christian75
(→‎Usage: Fix example (tlx didn't show short=yes) and a more interesting example than 0 days ago (current time))
 
Line 4: Line 4:
  
 
== Usage ==
 
== Usage ==
{{tlx|Days since|{{CURRENTYEAR}}|{{CURRENTMONTH}}|{{CURRENTDAY}}}} produces: {{Days since|{{CURRENTYEAR}}|{{CURRENTMONTH}}|{{CURRENTDAY}}}}
+
{{tlx|Days since|{{CURRENTYEAR}}|01|01}} produces: {{Days since|{{CURRENTYEAR}}|01|01}}
  
{{tlx|Days since|{{CURRENTYEAR}}|{{CURRENTMONTH}}|{{CURRENTDAY}}|short=yes}} produces: {{Days since|{{CURRENTYEAR}}|{{CURRENTMONTH}}|{{CURRENTDAY}}|short=yes}}
+
{{tlx|1=Days since|2={{CURRENTYEAR}}|3=01|4=01|5=short=yes}} produces: {{Days since|{{CURRENTYEAR}}|01|01|short=yes}}
  
 
== Template data ==
 
== Template data ==

Latest revision as of 15:15, 7 September 2020

{{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