Difference between revisions of "Template:Date"

From Self-sufficiency
Jump to: navigation, search
m (Protected Template:Date: restore protection ([edit=sysop] (indefinite) [move=sysop] (indefinite)))
(fix the pt + pr-BR problem)
Line 1: Line 1:
{{{{{|safesubst:}}}#switch:none
+
{{#if: {{{1|}}}{{{2|}}}{{{3|}}} |
|{{{{{|safesubst:}}}#iferror: {{{{{|safesubst:}}}#time:Y_M_d|{{{1|}}} }} | none }} <noinclude><!-- #time: can't handle --></noinclude>
+
{{#switch: {{#if: {{{4|}}} | {{{4}}} | {{int:lang}} }}
|{{{{{|safesubst:}}}#iferror: {{{{{|safesubst:}}}#expr: {{{1|}}}+0 }}
+
|bn      ={{I18n month|{{{2|}}}|bn}} {{#if: {{{3|}}} | {{formatnum|{{#expr: {{{3}}} }}|bn|sep=1}} }}, {{formatnum|{{{1|}}}|bn|sep=1}}
    |<noinclude><!--not a pure number--></noinclude>
+
|bpy    ={{I18n month|{{{2|}}}|bpy}} {{#if: {{{3|}}} | {{formatnum|{{#expr: {{{3}}} }}|bpy|sep=1}} }}, মারি {{formatnum|{{{1|}}}|bpy|sep=1}}
    |{{{{{|safesubst:}}}#ifexpr: {{{1|}}}+0 > 10000000000000
+
|cs      ={{#if: {{{3|}}} | {{#expr: {{{3}}} }}. {{I18n month|{{{2|}}}|cs|form={{#if:{{{form|}}}|{{{form}}}|gen}}}} | {{I18n month|{{{2|}}}|cs|form={{{form|}}}}} }} {{{1|}}}
      |<noinclude><!-- a yyyymmddhhmmss timestamp --></noinclude>
+
|da      ={{#if: {{{3|}}} | {{#expr: {{{3}}} }}.}} {{I18n month|{{{2|}}}|da}} {{{1|}}}
      |{{{{{|safesubst:}}}#ifeq: {{{{{|safesubst:}}}#expr:{{{1|}}}+0}} | {{{1|}}}
+
|de      ={{#if: {{{3|}}} | {{#expr: {{{3}}} }}.}} {{I18n month|{{{2|}}}|de}} {{{1|}}}
          | none <noinclude><!-- pure number eg 123.456 --></noinclude>
+
|de-formal={{#if: {{{3|}}} | {{#expr: {{{3}}} }}.}} {{I18n month|{{{2|}}}|de-formal}} {{{1|}}}
          | <noinclude><!-- assume yy-mm-dd --></noinclude>
+
|de-at  ={{#if: {{{3|}}} | {{#expr: {{{3}}} }}.}} {{I18n month|{{{2|}}}|de-at}} {{{1|}}}
        }}
+
|de-ch  ={{#if: {{{3|}}} | {{#expr: {{{3}}} }}.}} {{I18n month|{{{2|}}}|de-ch}} {{{1|}}}
    }}
+
|el      ={{#if: {{{3|}}} | {{#expr: {{{3}}} }} {{I18n month|{{{2|}}}|el|form=gen}} | {{I18n month|{{{2|}}}|el}} }} {{{1|}}}
  }}
+
|eo      ={{#if: {{{3|}}} | la {{#expr: {{{3}}} }}-a de}} {{I18n month|{{{2|}}}|eo}} {{{1|}}}
|{{{{{|safesubst:}}}#switch: {{lc:{{{2|}}}}} | none | asis=none }}
+
|es      ={{#if: {{{3|}}} | {{#expr: {{{3}}} }} de}} {{#if: {{{2|}}} | {{I18n month|{{{2|}}}|es}} de }} {{{1|}}}
|{{{{{|safesubst:}}}#ifexpr: {{{{{|safesubst:}}}#time:Y|{{{1|}}} }} < 1000 | none }}
+
|et      ={{#if: {{{3|}}} | {{#expr: {{{3}}} }}.}} {{I18n month|{{{2|}}}|et}} {{{1|}}}
|{{{{{|safesubst:}}}#switch: {{{{{|safesubst:}}}#time:Ynj|{{{1|}}} }}|100031|110031|130031|140031|150031=none}}
+
|fa      ={{#if: {{{3|}}} | {{formatnum|{{#expr: {{{3}}} }}|fa|sep=1}} }} {{I18n month|{{{2|}}}|fa}} {{formatnum|{{{1|}}}|fa|sep=1}}
|= {{{1|}}}<noinclude><!-- error or "none", so no formatting --></noinclude>
+
|fi      ={{#if: {{{3|}}} | {{#expr: {{{3}}} }}. }} {{#if: {{{2|}}} | {{I18n month|{{{2}}}|fi}}{{#if: {{{3|}}} |ta}} }} {{{1|}}}
|<noinclude><!-- continue with formatting --></noinclude>
+
|fr      ={{#if: {{{3|}}} | {{#expr: {{{3}}}}}{{#ifeq: {{{3|}}} | 1 |<sup>er</sup>}} }} {{I18n month|{{{2|}}}|fr}} {{{1|}}}
  {{{{{|safesubst:}}}#ifeq:<noinclude><!--
+
|ga      ={{#if: {{{3|}}} | {{#expr: {{{3}}}}}{{#ifeq: {{{3|}}} | 1 |<sup>ú</sup>}} }} {{I18n month|{{{2|}}}|ga}} {{{1|}}}
    --></noinclude>{{{{{|safesubst:}}}#time:Y|{{{1}}} 2008}}<noinclude><!--
+
|hi      ={{#if: {{{3|}}} | {{formatnum|{{#expr: {{{3}}} }}|hi|sep=1}} }} {{I18n month|{{{2|}}}|hi}} {{formatnum|{{{1|}}}|hi|sep=1}}
    --></noinclude>{{{{{|safesubst:}}}#iferror: {{{{{|safesubst:}}}#ifexpr: {{{1}}}>10000000000000 | no }} | }}<noinclude><!--
+
|hr      ={{#if: {{{3|}}} | {{#expr: {{{3}}} }}.}} {{I18n month|{{{2|}}}|hr}} {{#if: {{{1|}}} | {{#expr: {{{1|}}} }}.}}
    --></noinclude>{{{{{|safesubst:}}}#time:Y|{{{1}}} 2004}}
+
|hu      ={{#if: {{{1|}}} | {{#expr: {{{1|}}} }}. }} {{I18n month|{{{2|}}}|hu}} {{#if: {{{3|}}} | {{#expr: {{{3}}} }}{{#if: {{{form|}}} | | . }} }}
  |20082004
+
|ja      ={{#if: {{{1|}}} | {{#expr:{{{1|}}}}}年}}{{I18n month|{{{2|}}}|ja}}{{#if: {{{3|}}} |{{#expr:{{{3|}}}}}日}}
  |<noinclude><!-- no year --></noinclude>
+
|kn      ={{I18n month|{{{2|}}}|kn}} {{#if: {{{3|}}} | {{formatnum|{{#expr: {{{3}}} }}|kn|sep=1}} }}, {{formatnum|{{{1|}}}|kn|sep=1}}
    {{{{{|safesubst:}}}#ifeq:{{{{{|safesubst:}}}#time:d|{{{1}}} 2036}}|{{{{{|safesubst:}}}#time:d|{{{1}}} }}
+
|ko      ={{#if: {{{1|}}} | {{#expr: {{{1|}}} }}년}} {{I18n month|{{{2|}}}|ko}} {{#if: {{{3|}}} |{{#expr:{{{3|}}}}}}}
    |<noinclude><!-- month+day --></noinclude>{{{{{|safesubst:}}}#time:
+
|lt      ={{#if: {{{1|}}} | {{{1|}}} m. }} {{I18n month|{{{2|}}}|lt}} {{#if: {{{3|}}} | {{#expr: {{{3}}} }} d.}}
      {{{{{|safesubst:}}}#switch: {{lc: {{{{{|safesubst:}}}#ifeq:{{{3|}}}|y|L}}{{{2|}}} }}
+
|lv      ={{#if: {{{1|}}} | {{#expr:{{{1|}}}}}. gada }} {{#if: {{{3|}}} | {{#expr: {{{3}}} }}.}} {{I18n month|{{{2|}}}|lv}}
      | lmdy | liso | lymd      = [[:F j]]
+
|mr      ={{I18n month|{{{2|}}}|mr}} {{#if: {{{3|}}} | {{formatnum|{{#expr: {{{3}}} }}|mr|sep=1}} }}, इ.स. {{formatnum|{{{1|}}}|mr|sep=1}}
      | mdy  | iso  | ymd      = F j
+
|nds    ={{#if: {{{3|}}} | {{#expr: {{{3}}} }}.}} {{I18n month|{{{2|}}}|nds}} {{{1|}}}
      | ldmy | l                = [[:j F]]
+
|new    ={{I18n month|{{{2|}}}|new}} {{#if: {{{3|}}} | {{formatnum|{{#expr: {{{3}}} }}|new|sep=1}} }}, ई सं {{formatnum|{{{1|}}}|new|sep=1}}
      | #default                = j F
+
|nn      ={{#if: {{{3|}}} | {{#expr: {{{3}}} }}.}} {{I18n month|{{{2|}}}|nn}} {{{1|}}}
      }}|{{{1}}} 2000 }}<noinclude><!-- default='dmy' or null or "" or unsupported option --></noinclude>
+
|no      ={{#if: {{{3|}}} | {{#expr: {{{3}}} }}.}} {{I18n month|{{{2|}}}|no}} {{{1|}}}
    |<noinclude><!-- month only --></noinclude>{{{{{|safesubst:}}}#time:
+
|pa      ={{#if: {{{3|}}} | {{formatnum|{{#expr: {{{3}}} }}|pa|sep=1}} }} {{I18n month|{{{2|}}}|pa}} {{formatnum|{{{1|}}}|pa|sep=1}}
      {{{{{|safesubst:}}}#switch: {{lc: {{{{{|safesubst:}}}#ifeq:{{{3|}}}|y|L}}{{{2|}}} }}
+
|pl      ={{#if: {{{3|}}} | {{#expr: {{{3}}} }} {{I18n month|{{{2|}}}|pl|form=gen}} | {{I18n month|{{{2|}}}|pl|form={{#if:{{{form|}}}|{{{form|}}}}}}} }} {{{1|}}}
      | lmdy | liso | lymd
+
|pt      ={{#if: {{{3|}}} | {{#expr: {{{3}}} }} de }} {{#if: {{{2|}}} | {{I18n month|{{{2|}}}|pt}} de }} {{{1|}}}
      | ldmy | l                = [[F]]
+
|pt-BR  ={{#if: {{{3|}}} | {{#expr: {{{3}}} }} de }} {{#if: {{{2|}}} | {{lc:{{I18n month|{{{2|}}}|pt}}}} de }} {{{1|}}}
      | #default                = F
+
|ru      ={{#if: {{{3|}}} | {{#expr: {{{3}}} }} }} {{#if: {{{3|}}} | {{I18n month|{{{2|}}}|ru|form=gen}} | {{I18n month|{{{2|}}}|ru}} }} {{{1|}}}
      }}|{{{1}}} 2000 }}<noinclude><!-- default='dmy'/'mdy'/'ymd'/'iso'/null/""/unsupported opt --></noinclude>
+
|sr      ={{#if: {{{3|}}} | {{#expr: {{{3}}} }}. }} {{I18n month|{{{2|}}}|sr|}} {{#expr: {{{1|}}} }}.
    }}
+
|th      ={{#if: {{{3|}}} | {{#expr: {{{3}}} }} }} {{I18n month|{{{2|}}}|th}} {{#if: {{{1|}}} | {{#ifexpr: {{{1}}} <= 1940 | {{#if: {{{2|}}} | {{#ifexpr: {{{2|}}} < 4 | พ.ศ. {{#expr: {{{1}}} + 542 }} | พ.ศ. {{#expr: {{{1}}} + 543 }} }} | {{#expr: {{{1}}} + 542 }} หรือ {{#expr: {{{1}}} + 543 }} }} | พ.ศ. {{#expr: {{{1}}} + 543 }} }} }}
  |<noinclude><!-- with year--></noinclude>
+
|uk      ={{#if: {{{3|}}} | {{#expr: {{{3}}} }} }} {{I18n month|{{{2|}}}|uk|form=gen}} {{{1|}}}
    {{{{{|safesubst:}}}#if: {{{{{|safesubst:}}}#iferror:{{{{{|safesubst:}}}#time:j|2 {{{1|}}}}}|*D*|{{{{{|safesubst:}}}#iferror:{{{{{|safesubst:}}}#time:j|2000 {{{1|}}}}}|*D*| }}}}
+
|zh      ={{#if: {{{1|}}} | {{#expr:{{{1|}}}}}年}}{{I18n month|{{{2|}}}|zh}}{{#if: {{{3|}}} |{{#expr:{{{3|}}}}}日}}
    |<noinclude><!-- day+month+year --></noinclude>{{{{{|safesubst:}}}#time:
+
|zh-hans ={{#if: {{{1|}}} | {{#expr:{{{1|}}}}}年}}{{I18n month|{{{2|}}}|zh-hans}}{{#if: {{{3|}}} |{{#expr:{{{3|}}}}}日}}
      {{{{{|safesubst:}}}#switch: {{lc: {{{{{|safesubst:}}}#ifeq:{{{3|}}}|y|L}}{{{2|}}} }}
+
|zh-hant ={{#if: {{{1|}}} | {{#expr:{{{1|}}}}}年}}{{I18n month|{{{2|}}}|zh-hant}}{{#if: {{{3|}}} |{{#expr:{{{3|}}}}}日}}
      | lmdy                    = [[:F j]], [[Y]]
+
|zh-cn  ={{#if: {{{1|}}} | {{#expr:{{{1|}}}}}年}}{{I18n month|{{{2|}}}|zh-cn}}{{#if: {{{3|}}} |{{#expr:{{{3|}}}}}日}}
      | mdy                    = F j, Y
+
|zh-tw  ={{#if: {{{1|}}} | {{#expr:{{{1|}}}}}年}}{{I18n month|{{{2|}}}|zh-tw}}{{#if: {{{3|}}} |{{#expr:{{{3|}}}}}日}}
      | liso                    = [[Y|Y-]][[F j|m-d]]<noinclude><!-- i.e. [[Y-m-d]] --></noinclude>
+
|#default={{#if: {{{3|}}} | {{#expr: {{{3}}} }} }} {{I18n month|{{{2|}}}|{{#if: {{{4|}}} |{{{4}}}|{{int:lang}}}}}} {{{1|}}}
      | iso                    = Y-m-d
+
}}{{#if: {{{1|}}} |
      | lymd                    = [[Y]] [[:F j]]
+
<span style="display:none">(<span class="dtstart">{{padleft:{{{1}}}|4|0}}{{#if: {{{2|}}}|-{{padleft:{{{2}}}|2|0}}}}{{#if: {{{3|}}}|-{{padleft:{{{3}}}|2|0}}}}</span>)</span>
      | ymd                    = Y F j
+
}}}}<noinclude>
      | ldmy | l                = [[:j F]] [[Y]]
+
      | #default                = j F Y
+
      }}|{{{1|}}} }}<noinclude><!-- #default='dmy' or null or "" or unsupported option --></noinclude>
+
    |<noinclude><!-- month+year --></noinclude>{{{{{|safesubst:}}}#time:
+
      {{{{{|safesubst:}}}#switch: {{lc: {{{{{|safesubst:}}}#ifeq:{{{3|}}}|y|L}}{{{2|}}} }}
+
      | lmdy | liso | lymd | ldmy | l  = [[:F Y]]
+
      | #default               = F Y
+
      }}|{{{1|}}} }}<noinclude><!-- default='dmy'/'iso'/'mdy'/null/""/unsupported option --></noinclude>
+
    }}
+
  }}   
+
}}<noinclude>
+
 
{{documentation}}
 
{{documentation}}
 
</noinclude>
 
</noinclude>

Revision as of 18:19, 11 September 2010