"साचा:Date" च्या विविध आवृत्यांमधील फरक

५,५५१ बाइट्सची भर घातली ,  ७ वर्षांपूर्वी
छो
Revert to older version to find bug (script error in other templates)
(Undo revision 126880765 by Jarekt (talk) Attempt #2: this time I will call {{int:Lang}} in the template)
छो (Revert to older version to find bug (script error in other templates))
<!--
{{#invoke:Date|Date
INPUT PARAMETERS:
|year = {{{year|{{{1|}}}}}}
{{{1|}}} = year: {{#expr: {{{1|}}} }} will strip leading zeros if any
|month = {{{month|{{{2|}}}}}}
{{{2|day}}} = month: input =to {{{day|{{{3|}}}}I18n month}}
{{{3|}}} = day: {{#expr: {{{3}}} }} will strip leading zeros if any
|hour = {{{hour|}}}
{{{4|}}} = language code
|minute = {{{minute|}}}
|second = {{{secondform|}}} =
{{{meta|}}} = add invisible machine readable metadata? default=y; use =n to skip
|class = {{{class|}}}
 
|lang = {{#if:{{{lang|{{{4|}}}}}} | {{{lang|{{{4|}}}}}} |{{int:Lang}}}}
* <span style="white-space:nowrap"> - prevents date from being broken into two lanes
|case = {{{case|{{{form|}}}}}}
 
}}<noinclude>
-->{{#if: {{{1|}}} | {{#ifeq: {{lc:{{{meta|y}}}}}| n | |<span style="white-space:nowrap"><time class="{{{class|dtstart}}}" datetime="{{padleft:{{{1}}}|4|0}}{{#if: {{{2|}}}|-{{padleft:{{{2}}}|2|0}}}}{{#if: {{{3|}}}|-{{padleft:{{{3}}}|2|0}}}}"> }} }}<!--
-->{{#if: {{{1|}}}{{{2|}}}{{{3|}}} |
|lang ={{#switch: {{#if:{{{lang| {{{4|}}}}}} | {{{lang|{{{4|}}}}}} | {{int:Langlang}} }}
 
<!-- Iberian language group (day de month de year) -->
|es |gl |pt |pt-br
={{#if: {{{3|}}} | {{#expr: {{{3}}} }} {{#if: {{{2|}}} | de }}}} {{#if: {{{2|}}} | {{I18n month|{{{2|}}}|{{{4|}}}}} {{#if: {{{1|}}} | de }}}} {{Trim|{{{1|}}}}}
 
<!-- Slavic group 1: if YYYY-MM-DD than month is in gen form, if YYYY-MM than month in basic form -->
|uk |be |be-tarask |el
={{#if: {{{3|}}} | {{#expr:{{{3}}} }} {{I18n month|{{{2|}}}|{{{4|}}}|form=gen}} | {{I18n month|{{{2|}}}|{{{4|}}}}} }} {{Trim|{{{1|}}}}}
 
<!-- Slavic group 2: if YYYY-MM-DD than month is in gen form, if YYYY-MM than month form is controlled by {{{form}}} -->
|pl |ru ={{#if: {{{3|}}} | {{#expr:{{{3}}} }} {{I18n month|{{{2|}}}|{{{4|}}}|form=gen}} | {{I18n month|{{{2|}}}|{{{4|}}}|form={{{form|}}} }} }} {{Trim|{{{1|}}}}}
 
<!-- Slavic group 3: uses . after day. If YYYY-MM-DD than month is in gen form, if YYYY-MM than month in basic form. In both cases for can be overwritten by {{{form}}} -->
|cs|sl ={{#if: {{{3|}}} | {{#expr: {{{3}}} }}. {{I18n month|{{{2|}}}|{{{4|}}}|form={{#if:{{{form|}}}|{{{form}}}|gen}}}} | {{I18n month|{{{2|}}}|{{{4|}}}|form={{{form|}}} }} }} {{Trim|{{{1|}}}}}
 
<!-- Finnish language: YYYY-MM-DD month in Partitive form, if YYYY-MM than month form is controlled by {{{form}}} -->
|fi ={{#if: {{{3|}}} | {{#expr: {{{3}}} }}. {{I18n month|{{{2}}}|fi|form=ptv}} | {{I18n month|{{{2|}}}|fi|form={{{form|}}} }} }} {{Trim|{{{1|}}}}}
 
<!-- Germanic language group (day. month year) -->
|da |de |de-formal |de-at |de-ch |bar |et |nds |nn |no
={{#if: {{{3|}}} | {{#expr:{{{3}}}}}.}} {{I18n month|{{{2|}}}|{{{4|}}}}} {{Trim|{{{1|}}}}}
 
<!-- South Asia group -->
|fa |hi |pa
={{#if: {{{3|}}} | {{formatnum|{{#expr: {{{3}}} }}|{{{4|}}}|sep=1}} }} {{I18n month|{{{2|}}}|{{{4|}}}}} {{formatnum|{{{1|}}}|{{{4|}}}|sep=1}}
 
<!-- Chinese-like group (year年 month day日) -->
|zh |zh-hans |zh-hant |zh-cn |zh-tw |ja
={{#if: {{{1|}}} | {{#expr:{{{1|}}}}}年}}{{I18n month|{{{2|}}}|{{{4|}}}}}{{#if: {{{3|}}} |{{#expr:{{{3|}}}}}日}}
 
<!-- individual languages in alphabetic order using syntax different than default or other groups below -->
|bn ={{I18n month|{{{2|}}}|bn}} {{#if: {{{3|}}} | {{formatnum|{{#expr: {{{3}}} }}|bn|sep=1}} }}, {{formatnum|{{{1|}}}|bn|sep=1}}
|bpy ={{I18n month|{{{2|}}}|bpy}} {{#if: {{{3|}}} | {{formatnum|{{#expr: {{{3}}} }}|bpy|sep=1}} }}, মারি {{formatnum|{{{1|}}}|bpy|sep=1}}
|eo ={{#if: {{{3|}}} | la {{#expr: {{{3}}} }}-a de}} {{I18n month|{{{2|}}}|eo}} {{Trim|{{{1|}}}}}
|fr ={{#if: {{{3|}}} | {{#expr: {{{3}}}}}{{#ifeq: {{{3|}}} | 1 |<sup>er</sup>}} }} {{I18n month|{{{2|}}}|fr}} {{Trim|{{{1|}}}}}
|ga ={{#if: {{{3|}}} | {{#expr: {{{3}}}}}{{#ifeq: {{{3|}}} | 1 |<sup>ú</sup>}} }} {{I18n month|{{{2|}}}|ga}} {{Trim|{{{1|}}}}}
|hr ={{#if: {{{3|}}} | {{#expr: {{{3}}} }}.}} {{I18n month|{{{2|}}}|hr}} {{#if: {{{1|}}} | {{#expr: {{{1|}}} }}.}}
|hu ={{#if: {{{1|}}} | {{#expr: {{{1}}} }}.}} {{I18n month|{{{2|}}}|hu}} {{#if: {{{3|}}} | {{#expr: {{{3}}} }}{{#if: {{{form|}}} | | . }} }}
|ia ={{#if: {{{3|}}} | {{#expr: {{{3}}} }} de}} {{#if: {{{2|}}} | {{I18n month|{{{2|}}}|ia}} }} {{Trim|{{{1|}}}}}
|kn ={{I18n month|{{{2|}}}|kn}} {{#if: {{{3|}}} | {{formatnum|{{#expr: {{{3}}} }}|kn|sep=1}} }}, {{formatnum|{{{1|}}}|kn|sep=1}}
|ko ={{#if: {{{1|}}} | {{#expr: {{{1|}}} }}년}} {{I18n month|{{{2|}}}|ko}} {{#if: {{{3|}}} |{{#expr:{{{3|}}}}}일}}
|lt ={{#if: {{{1|}}} | {{{1|}}} m. }} {{I18n month|{{{2|}}}|lt}} {{#if: {{{3|}}} | {{#expr: {{{3}}} }} d.}}
|lv ={{#if: {{{1|}}} | {{#expr:{{{1|}}}}}. gada }} {{#if: {{{3|}}} | {{#expr: {{{3}}} }}.}} {{I18n month|{{{2|}}}|lv}}
|mk ={{#if: {{{3|}}} | {{#expr: {{{3}}} }} }} {{I18n month|{{{2|}}}|mk}} {{#expr: {{{1|}}} }}
|ml ={{#if: {{{1|}}} | {{#expr: {{{3|}}} }} {{I18n month|{{{2|}}}|ml}} {{#expr:{{{1|}}} }}|{{I18n month|{{{2|}}}|ml}} {{#expr:{{{3|}}} }} }}
|mr ={{I18n month|{{{2|}}}|mr}} {{#if: {{{3|}}} | {{formatnum|{{#expr: {{{3}}} }}|mr|sep=1}} }}, इ.स. {{formatnum|{{{1|}}}|mr|sep=1}}
|new ={{I18n month|{{{2|}}}|new}} {{#if: {{{3|}}} | {{formatnum|{{#expr: {{{3}}} }}|new|sep=1}} }}, ई सं {{formatnum|{{{1|}}}|new|sep=1}}
|oc ={{#if: {{{3|}}} | {{#expr: {{{3}}} }} }} {{#if: {{{2|}}} | {{I18n month|{{{2|}}}|oc}} de }} {{Trim|{{{1|}}}}}
|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 }} }} }}
|vi ={{#expr:{{{3|}}}}} {{I18n month|{{{2|}}}|{{{4|}}}}} {{#if: {{{1|}} | năm {{{1}}} }}
 
<!-- default (English) group (day month year) -->
|#default={{#expr:{{{3|}}}}} {{I18n month|{{{2|}}}|{{{4|}}}}} {{Trim|{{{1|}}}}}
 
}}{{#if: {{{1|}}} | {{#ifeq: {{lc:{{{meta|y}}}}}| n | |
</time></span>
}}}}}}<noinclude>
{{documentation}}
</noinclude>
४२

संपादने