Template:Date: Difference between revisions

[unchecked revision][unchecked revision]
Content deleted Content added
m 1 revision imported
 
m 1 revision imported
 
(2 intermediate revisions by 2 users not shown)
Line 1:
{{safesubst:<noinclude/>#switch:none
<!--
|{{safesubst:<noinclude/>#iferror: {{safesubst:<noinclude/>#time:Y_M_d|{{{1|}}} }} | none }} <noinclude><!-- #time: can't handle --></noinclude>
{{{1|}}} = year: {{#expr: {{{1|}}} }} will strip leading zeros if any
|{{safesubst:<noinclude/>#iferror: {{safesubst:<noinclude/>#expr: {{{1|}}}+0 }}
{{{2|}}} = month: input to {{I18n month}}
|<noinclude><!--not a pure number--></noinclude>
{{{3|}}} = day: {{#expr: {{{3}}} }} will strip leading zeros if any
|{{safesubst:<noinclude/>#ifexpr: {{{1|}}}+0 > 10000000000000
{{{4|}}} = language code
|<noinclude><!-- a yyyymmddhhmmss timestamp --></noinclude>
 
--> |{{safesubst:<noinclude/>#ififeq: {{safesubst:<noinclude/>#expr:{{{1|}}}{{{2|}+0}} | {{{31|}}} |
| none <noinclude><!-- pure number eg 123.456 --></noinclude>
{{#switch: {{#if: {{{4|}}} | {{{4}}} | {{int:lang}} }}
| <noinclude><!-- assume yy-mm-dd --></noinclude>
 
}}
<!-- Spanish-like group (day de month de year) -->
}}
|es |gl |pt
}}
={{#if: {{{3|}}} | {{#expr: {{{3}}} }} de}} {{#if: {{{2|}}} | {{I18n month|{{{2|}}}|{{{4|}}}}} de }} {{{1|}}}
|{{safesubst:<noinclude/>#switch: {{safesubst:<noinclude/>lc:{{{2|}}}}} | none | asis | link | lnone =none }}
 
|{{safesubst:<noinclude/>#ifexpr: {{safesubst:<noinclude/>#time:Y|{{{1|}}} }} < 1000 | none }}
<!-- Slavic group 1: if YYYY-MM-DD than month is in gen form, if YYYY-MM than month in basic form -->
|{{safesubst:<noinclude/>#switch: {{safesubst:<noinclude/>#time:Ynj|{{{1|}}} }}|100031|110031|130031|140031|150031=none}}
|uk |be |be-tarask |el
|= {{safesubst:<noinclude/>#if:{{{1|}}}
={{#if: {{{3|}}} | {{#expr:{{{3}}}}} {{I18n month|{{{2|}}}|{{{4|}}}|form=gen}} | {{I18n month|{{{2|}}}|{{{4|}}}}} }} {{{1|}}}
|{{safesubst:<noinclude/>#switch:{{{2}}}
 
|link|lnone|l=[[{{{1}}}]]
<!-- Slavic group 2: if YYYY-MM-DD than month is in gen form, if YYYY-MM than month form is controlled by {{{form}}} -->
|{{{1}}}
|pl |ru ={{#if: {{{3|}}} | {{#expr:{{{3}}}}} {{I18n month|{{{2|}}}|{{{4|}}}|form=gen}} | {{I18n month|{{{2|}}}|{{{4|}}}|form={{{form|}}} }} }} {{{1|}}}
}}
 
}}<noinclude><!-- error or "none", so no formatting --></noinclude>
<!-- Finnish language: YYYY-MM-DD month in Partitive form, if YYYY-MM than month form is controlled by {{{form}}} -->
|<noinclude><!-- continue with formatting --></noinclude>
|fi ={{#if: {{{3|}}} | {{#expr: {{{3}}} }}. {{I18n month|{{{2}}}|fi|form=ptv}} | {{I18n month|{{{2|}}}|fi|form={{{form|}}} }} }} {{{1|}}}
{{safesubst:<noinclude/>#ifeq:<noinclude><!--
 
--></noinclude>{{safesubst:<noinclude/>#time:Y|{{{1}}} 2008}}<noinclude><!--
<!-- German-like group (day. month year) -->
--></noinclude>{{safesubst:<noinclude/>#iferror: {{safesubst:<noinclude/>#ifexpr: {{{1}}}>10000000000000 | no }} | }}<noinclude><!--
|da |de |de-formal |de-at |de-ch |bar |et |nds |nn |no
--></noinclude>{{safesubst:<noinclude/>#time:Y|{{{1}}} 2004}}
={{#if: {{{3|}}} | {{#expr:{{{3}}}}}.}} {{I18n month|{{{2|}}}|{{{4|}}}}} {{{1|}}}
|20082004
 
|<noinclude><!-- no year --></noinclude>
<!-- South Asia group -->
{{safesubst:<noinclude/>#ifeq:{{safesubst:<noinclude/>#time:d|{{{1}}} 2036}}|{{safesubst:<noinclude/>#time:d|{{{1}}} }}
|fa |hi |pa
|<noinclude><!-- month+day --></noinclude>{{safesubst:<noinclude/>#time:
={{#if: {{{3|}}} | {{formatnum|{{#expr: {{{3}}} }}|{{{4|}}}|sep=1}} }} {{I18n month|{{{2|}}}|{{{4|}}}}} {{formatnum|{{{1|}}}|{{{4|}}}|sep=1}}
{{safesubst:<noinclude/>#switch: {{safesubst:<noinclude/>lc: {{safesubst:<noinclude/>#ifeq:{{{3|}}}|y|L}}{{{2|}}} }}
 
| lmdy | liso | lymd = [[:F j]]
<!-- Chinese-like group (year年 month day日) -->
| mdy | iso | ymd = F j
|zh |zh-hans |zh-hant |zh-cn |zh-tw |ja
| ldmy | l = [[:j F]]
={{#if: {{{1|}}} | {{#expr:{{{1|}}}}}年}}{{I18n month|{{{2|}}}|{{{4|}}}}}{{#if: {{{3|}}} |{{#expr:{{{3|}}}}}日}}
| #default = j F
 
}}|{{{1}}} 2000 }}<noinclude><!-- default='dmy' or null or "" or unsupported option --></noinclude>
<!-- individual languages in alphabetic order using syntax different than default or other groups below -->
|<noinclude><!-- month only --></noinclude>{{safesubst:<noinclude/>#time:
|bn ={{I18n month|{{{2|}}}|bn}} {{#if: {{{3|}}} | {{formatnum|{{#expr: {{{3}}} }}|bn|sep=1}} }}, {{formatnum|{{{1|}}}|bn|sep=1}}
{{safesubst:<noinclude/>#switch: {{safesubst:<noinclude/>lc: {{safesubst:<noinclude/>#ifeq:{{{3|}}}|y|L}}{{{2|}}} }}
|bpy ={{I18n month|{{{2|}}}|bpy}} {{#if: {{{3|}}} | {{formatnum|{{#expr: {{{3}}} }}|bpy|sep=1}} }}, মারি {{formatnum|{{{1|}}}|bpy|sep=1}}
| lmdy | liso | lymd
|cs ={{#if: {{{3|}}} | {{#expr: {{{3}}} }}. {{I18n month|{{{2|}}}|cs|form={{#if:{{{form|}}}|{{{form}}}|gen}}}} | {{I18n month|{{{2|}}}|cs|form={{{form|}}}}} }} {{{1|}}}
| ldmy | l = [[F]]
|eo ={{#if: {{{3|}}} | la {{#expr: {{{3}}} }}-a de}} {{I18n month|{{{2|}}}|eo}} {{{1|}}}
| #default = F
|fr ={{#if: {{{3|}}} | {{#expr: {{{3}}}}}{{#ifeq: {{{3|}}} | 1 |<sup>er</sup>}} }} {{I18n month|{{{2|}}}|fr}} {{{1|}}}
}}|{{{1}}} 2000 }}<noinclude><!-- default='dmy'/'mdy'/'ymd'/'iso'/null/""/unsupported opt --></noinclude>
|ga ={{#if: {{{3|}}} | {{#expr: {{{3}}}}}{{#ifeq: {{{3|}}} | 1 |<sup>ú</sup>}} }} {{I18n month|{{{2|}}}|ga}} {{{1|}}}
}}
|hr ={{#if: {{{3|}}} | {{#expr: {{{3}}} }}.}} {{I18n month|{{{2|}}}|hr}} {{#if: {{{1|}}} | {{#expr: {{{1|}}} }}.}}
|<noinclude><!-- with year--></noinclude>
|hu ={{#if: {{{1|}}} | {{#expr: {{{1}}} }}.}} {{I18n month|{{{2|}}}|hu}} {{#if: {{{3|}}} | {{#expr: {{{3}}} }}{{#if: {{{form|}}} | | . }} }}
|ia ={{safesubst:<noinclude/>#if: {{{3|}}} | safesubst:<noinclude/>#iferror:{{safesubst:<noinclude/>#exprtime:j|2 {{{31|}}} }} de}} |*D*|{{safesubst:<noinclude/>#ififerror: {{{2|}}} safesubst:<noinclude/>#time:j|2000 {{I18n month|{{{21|}}}|ia}}|*D*| }} {{{1|}}}
|<noinclude><!-- day+month+year --></noinclude>{{safesubst:<noinclude/>#time:
|kn ={{I18n month|{{{2|}}}|kn}} {{#if: {{{3|}}} | {{formatnum|{{#expr: {{{3}}} }}|kn|sep=1}} }}, {{formatnum|{{{1|}}}|kn|sep=1}}
|ko ={{safesubst:<noinclude/>#ifswitch: {{{1|}}} |safesubst:<noinclude/>lc: {{safesubst:<noinclude/>#exprifeq: {{{13|}}} }}년}} {{I18n month|{{{2y|L}}}|ko}} {{#if: {{{32|}}} |{{#expr:{{{3|}}}}}일}}
| lmdy = [[:F j]], [[Y]]
|lt ={{#if: {{{1|}}} | {{{1|}}} m. }} {{I18n month|{{{2|}}}|lt}} {{#if: {{{3|}}} | {{#expr: {{{3}}} }} d.}}
| mdy = F j, Y
|lv ={{#if: {{{1|}}} | {{#expr:{{{1|}}}}}. gada }} {{#if: {{{3|}}} | {{#expr: {{{3}}} }}.}} {{I18n month|{{{2|}}}|lv}}
| liso = [[Y|Y-]][[F j|m-d]]<noinclude><!-- i.e. [[Y-m-d]] --></noinclude>
|mk ={{#if: {{{3|}}} | {{#expr: {{{3}}} }} }} {{I18n month|{{{2|}}}|mk}} {{#expr: {{{1|}}} }}
| iso = Y-m-d
|ml ={{#if: {{{1|}}} | {{#expr:{{{3|}}} }} {{I18n month|{{{2|}}}|ml}} {{#expr:{{{1|}}} }}|{{I18n month|{{{2|}}}|ml}} {{#expr:{{{3|}}} }} }}
| lymd = [[Y]] [[:F j]]
|mr ={{I18n month|{{{2|}}}|mr}} {{#if: {{{3|}}} | {{formatnum|{{#expr: {{{3}}} }}|mr|sep=1}} }}, इ.स. {{formatnum|{{{1|}}}|mr|sep=1}}
| ymd = Y F j
|new ={{I18n month|{{{2|}}}|new}} {{#if: {{{3|}}} | {{formatnum|{{#expr: {{{3}}} }}|new|sep=1}} }}, ई सं {{formatnum|{{{1|}}}|new|sep=1}}
| ldmy | l = [[:j F]] [[Y]]
|oc ={{#if: {{{3|}}} | {{#expr: {{{3}}} }} }} {{#if: {{{2|}}} | {{I18n month|{{{2|}}}|oc}} de }} {{{1|}}}
| #default = j F Y
|pt-br ={{#if: {{{3|}}} | {{#expr: {{{3}}} }} de }} {{#if: {{{2|}}} | {{lc:{{I18n month|{{{2|}}}|pt}}}} de }} {{{1|}}}
}}|{{{1|}}} }}<noinclude><!-- #default='dmy' or null or "" or unsupported option --></noinclude>
|sl ={{#if: {{{3|}}} | {{#expr: {{{3}}} }}.}} {{I18n month|{{{2|}}}|sl|form={{{form|}}} }} {{{1|}}}
|<noinclude><!-- month+year --></noinclude>{{safesubst:<noinclude/>#time:
|sr ={{#if: {{{3|}}} | {{#expr: {{{3}}} }}.}} {{I18n month|{{{2|}}}|sr|}} {{#expr: {{{1|}}} }}.
{{safesubst:<noinclude/>#switch: {{safesubst:<noinclude/>lc: {{safesubst:<noinclude/>#ifeq:{{{3|}}}|y|L}}{{{2|}}} }}
|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 }} }} }}
| lmdy | liso | lymd | ldmy | l = [[:F Y]]
 
<!-- | #default (English) group (day month year) --> = F Y
}}|{{{1|}}} }}<noinclude><!-- default='dmy'/'iso'/'mdy'/null/""/unsupported option --></noinclude>
|#default={{#expr:{{{3|}}}}} {{I18n month|{{{2|}}}|{{{4|}}}}} {{{1|}}}
}}
 
}}
}}{{#if: {{{1|}}} |
}}<noinclude>
<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>
}}}}<noinclude>
{{documentation}}
</noinclude>