Difference between revisions of "Template:Days ago"

From Team Fortress Wiki
Jump to: navigation, search
Line 13: Line 13:
 
   | ja = 今日
 
   | ja = 今日
 
   | nl = Vandaag
 
   | nl = Vandaag
 +
  | no = Idag
 
   | pl = Dzisiaj
 
   | pl = Dzisiaj
 
   | pt = Hoje
 
   | pt = Hoje
Line 32: Line 33:
 
   | ja = 昨日
 
   | ja = 昨日
 
   | nl = Gisteren
 
   | nl = Gisteren
 +
  | no = Igår
 
   | pl = wczoraj
 
   | pl = wczoraj
 
   | pt = Ontem
 
   | pt = Ontem
Line 51: Line 53:
 
   | ja = {{#expr:{{LOCALDAY}} - {{{2|}}}}}{{PLURAL:{{#expr:{{LOCALDAY}} - {{{2|}}}}}|日}}前
 
   | ja = {{#expr:{{LOCALDAY}} - {{{2|}}}}}{{PLURAL:{{#expr:{{LOCALDAY}} - {{{2|}}}}}|日}}前
 
   | nl = {{#expr:{{LOCALDAY}} - {{{2|}}}}} {{PLURAL:{{#expr:{{LOCALDAY}} - {{{2|}}}}}|dag|dagen}} geleden
 
   | nl = {{#expr:{{LOCALDAY}} - {{{2|}}}}} {{PLURAL:{{#expr:{{LOCALDAY}} - {{{2|}}}}}|dag|dagen}} geleden
 +
  | no = {{#expr:{{LOCALDAY}} - {{{2|}}}}} {{PLURAL:{{#expr:{{LOCALDAY}} - {{{2|}}}}}|dag|dager}} siden
 
   | pt = {{#expr:{{LOCALDAY}} - {{{2|}}}}} {{PLURAL:{{#expr:{{LOCALDAY}} - {{{2|}}}}}|dia|dias}} atrás
 
   | pt = {{#expr:{{LOCALDAY}} - {{{2|}}}}} {{PLURAL:{{#expr:{{LOCALDAY}} - {{{2|}}}}}|dia|dias}} atrás
 
   | pl = {{#expr:{{LOCALDAY}} - {{{2|}}}}} dni temu
 
   | pl = {{#expr:{{LOCALDAY}} - {{{2|}}}}} dni temu

Revision as of 20:01, 20 October 2010

Documentation for Days ago

This template makes use of ParserFunctions in the MediaWiki software to calculate the amount of days past since a specified date. Its main usage is on the {{Latest updates}} template that appears on the Main Page. As the code of this template can be quite complex, {{Days ago/core}} is used to hold the mathematical expressions and {{Days ago}} handles language translations.

Usage

  • {{Days ago|9|2}} (Month is 9, date is 2) generates Lua error in Module:Age at line 96: attempt to perform arithmetic on local 'day' (a nil value). days ago
  • {{Days ago|9|2|brackets=0}} generates Lua error in Module:Age at line 96: attempt to perform arithmetic on local 'day' (a nil value). days ago

Limitations

Currently {{days ago}} cannot handle days spanning multiple months. For example, if the given date is August 29 and the current date is September 2, the template will produce a null output.