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

From comp.tf
Jump to navigation Jump to search
(Created page with "'''{{tl|Days since}}''' shows the years/days (or months/days) since a specific date. == Usage == This template is a facade for {{tl|Time ago}} which invokes that template to...")
 
 
Line 13: Line 13:
 
Using this template with a single parameter is identical to using <code><nowiki>{{Time ago|03 Dec 1969|magnitude=days|ago=|numeric=y}}</nowiki></code>.
 
Using this template with a single parameter is identical to using <code><nowiki>{{Time ago|03 Dec 1969|magnitude=days|ago=|numeric=y}}</nowiki></code>.
  
{{tlx|Days since|1 Jan {{CURRENTYEAR}}}} produces: {{Days since|1 Jan {{CURRENTYEAR}}}}
+
<code><nowiki>{{Days since|1 Jan {{CURRENTYEAR}}}}</nowiki></code> produces: {{Days since|1 Jan {{CURRENTYEAR}}}}
  
{{tlx|Days since|{{CURRENTYEAR}}|06|13}} produces: {{Days since|{{CURRENTYEAR}}|06|13}}
+
<code><nowiki>{{Days since|{{CURRENTYEAR}}|06|13}}</nowiki></code> produces: {{Days since|{{CURRENTYEAR}}|06|13}}
  
{{tlx|Days since|31 December 1969}} produces: {{Days since|31 December 1969}}
+
<code><nowiki>{{Days since|31 December 1969}}</nowiki></code> produces: {{Days since|31 December 1969}}

Latest revision as of 09:58, 23 September 2022

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

Usage[edit]

This template is a facade for {{Time ago}} which invokes that template to specifically return an integer of the amount of days since a given timestamp. {{Time ago}} is a larger template, with many more options, that can be used for more customized output.

There are two ways to use this template:

  • With three parameters YYYY-MM-DD: Template:Tlx
  • With one parameter. If this is done, the date MUST be formatted in one of these four ways:
    • 03 Dec 1969
    • 03 December 1969
    • 3 Dec 1969
    • 3 December 1969

Using this template with a single parameter is identical to using {{Time ago|03 Dec 1969|magnitude=days|ago=|numeric=y}}.

{{Days since|1 Jan {{CURRENTYEAR}}}} produces: Template:Time ago


{{Days since|{{CURRENTYEAR}}|06|13}} produces: Template:Time ago


{{Days since|31 December 1969}} produces: Template:Time ago