Difference between revisions of "Template:Days ago"

From Team Fortress Wiki
Jump to: navigation, search
(add force parameter)
(added new /ar lines to temp)
Line 5: Line 5:
  
 
| today = {{#if:{{{br|}}}|(}}{{lang | {{#if:{{{force|}}}|force|null}} = {{{force|}}}
 
| today = {{#if:{{{br|}}}|(}}{{lang | {{#if:{{{force|}}}|force|null}} = {{{force|}}}
 +
  | ar = اليوم
 
   | cs = Dnes
 
   | cs = Dnes
 
   | de = Heute
 
   | de = Heute
Line 28: Line 29:
  
 
| yesterday = {{#if:{{{br|}}}|(}}{{lang | {{#if:{{{force|}}}|force|null}} = {{{force|}}}
 
| yesterday = {{#if:{{{br|}}}|(}}{{lang | {{#if:{{{force|}}}|force|null}} = {{{force|}}}
 +
  | ar = أمس
 
   | cs = Včera
 
   | cs = Včera
 
   | de = Gestern
 
   | de = Gestern
Line 51: Line 53:
  
 
| days-ago = {{#if:{{{br|}}}|(}}{{lang | {{#if:{{{force|}}}|force|null}} = {{{force|}}}
 
| days-ago = {{#if:{{{br|}}}|(}}{{lang | {{#if:{{{force|}}}|force|null}} = {{{force|}}}
 +
  | ar = {{age in days|{{{1}}}|{{{2}}}|{{{3}}}}} {{PLURAL:{{age in days|{{{1}}}|{{{2}}}|{{{3}}}}}|يوم|أيام}} الماضية
 
   | cs = před {{age in days|{{{1}}}|{{{2}}}|{{{3}}}}} dny
 
   | cs = před {{age in days|{{{1}}}|{{{2}}}|{{{3}}}}} dny
 
   | de = vor {{age in days|{{{1}}}|{{{2}}}|{{{3}}}}} Tagen
 
   | de = vor {{age in days|{{{1}}}|{{{2}}}|{{{3}}}}} Tagen
Line 74: Line 77:
  
 
}}</includeonly><noinclude>
 
}}</includeonly><noinclude>
{{translation switching|all languages except: ar}}
+
{{translation switching|all languages}}
 
{{doc begin}}
 
{{doc begin}}
 
This template makes use of [http://www.mediawiki.org/wiki/Help:Extension:ParserFunctions ParserFunctions] in the MediaWiki software to calculate the amount of days past since a specified date. Its main usage is on the {{tl|Latest updates}} template that appears on the [[Main Page]]. As the code of this template can be quite complex, {{tl|Days ago/core}} is used to hold the mathematical expressions and {{tl|Days ago}} handles language translations.
 
This template makes use of [http://www.mediawiki.org/wiki/Help:Extension:ParserFunctions ParserFunctions] in the MediaWiki software to calculate the amount of days past since a specified date. Its main usage is on the {{tl|Latest updates}} template that appears on the [[Main Page]]. As the code of this template can be quite complex, {{tl|Days ago/core}} is used to hold the mathematical expressions and {{tl|Days ago}} handles language translations.

Revision as of 18:34, 2 March 2011

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|2010|12|8}} (yyyy-m-d) generates 5104 days ago
  • {{Days ago|2010|12|8|br=yes}} (yyyy-m-d) generates (5104 days ago)