Actions

Template

Template:Date/doc

From HacDC Wiki

< Template:Date
Revision as of 18:49, 22 January 2010 by Redbeard (talk | contribs) (Created page with '{{TemplateBox |1=1 |1d=number of the year |2=2 |2d=number of month in the year |3=3 |3d=number of day in the month |4=4 |4d=language code (only needs to be provided if the langua…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

{{TemplateBox/{{#ifexist: Template:TemplateBox/{{#if: |{{{2}}}|⧼Lang⧽}} | {{#if: |{{{2}}}|⧼Lang⧽}} | {{#ifexist: Template:TemplateBox/ | | {{#ifexist: Template:TemplateBox/Template:GetFallback2 | Template:GetFallback2 | en }} }} }} |1=1|1d=number of the year|1def=|1stat=|2=2|2d=number of month in the year|2def=|2stat= |3=3|3d=number of day in the month|3def=|3stat=|4=4|4d=language code (only needs to be provided if the language shall be fixed and independant from the user's preferences)|4def=value of {{int:Lang}}|4stat= |5=form|5d=allows to specify differing syntactic forms to apply to the date (e.g. in some Polish phrases the month must appear in genitive form instead of nominative, so you have to set form to gen)|5def=|5stat=|6=|6d=|6def=|6stat= |7=|7d=|7def=|7stat=|8=|8d=|8def=|8stat= |9=|9d=|9def=|9stat=|10=|10d=|10def=|10stat= |11=|11d=|11def=|11stat=|12=|12d=|12def=|12stat= |13=|13d=|13def=|13stat=|14=|14d=|14def=|14stat= |15=|15d=|15def=|15stat=|16=|16d=|16def=|16stat= |17=|17d=|17def=|17stat=|18=|18d=|18def=|18stat= |19=|19d=|19def=|19stat=|20=|20d=|20def=|20stat= |name=Date|desc=This template is used to show the date of publication or upload in the language set in the preferences.

You can leave out parts of the data.|namespace=Template|usergroup=all|placement=|usage-notes=Date example: 9 January 2009

{{Date|2009|1|9}}

Result, date in the language of your preferences: {{#if: 200919 | {{#switch: {{#if: | {{{4}}} | ⧼lang⧽ }} |bn =Template:I18n month {{#if: 9 | Template:Formatnum }}, Template:Formatnum |bpy =Template:I18n month {{#if: 9 | Template:Formatnum }}, মারি Template:Formatnum |cs ={{#if: 9 | {{#expr: 9 }}. Template:I18n month | Template:I18n month }} 2009 |da ={{#if: 9 | {{#expr: 9 }}.}} Template:I18n month 2009 |de ={{#if: 9 | {{#expr: 9 }}.}} Template:I18n month 2009 |de-formal={{#if: 9 | {{#expr: 9 }}.}} Template:I18n month 2009 |de-at ={{#if: 9 | {{#expr: 9 }}.}} Template:I18n month 2009 |de-ch ={{#if: 9 | {{#expr: 9 }}.}} Template:I18n month 2009 |el ={{#if: 9 | {{#expr: 9 }} Template:I18n month | Template:I18n month }} 2009 |eo ={{#if: 9 | la {{#expr: 9 }}-a de}} Template:I18n month 2009 |es ={{#if: 9 | {{#expr: 9 }} de}} {{#if: 1 | Template:I18n month de }} 2009 |et ={{#if: 9 | {{#expr: 9 }}.}} Template:I18n month 2009 |fa ={{#if: 9 | Template:Formatnum }} Template:I18n month Template:Formatnum |fi ={{#if: 9 | {{#expr: 9 }}. }} {{#if: 1 | Template:I18n month{{#if: 9 |ta}} }} 2009 |fr ={{#if: 9 | {{#expr: 9}}{{#ifeq: 9 | 1 |er}} }} Template:I18n month 2009 |ga ={{#if: 9 | {{#expr: 9}}{{#ifeq: 9 | 1 |ú}} }} Template:I18n month 2009 |hi ={{#if: 9 | Template:Formatnum }} Template:I18n month Template:Formatnum |hr ={{#if: 9 | {{#expr: 9 }}.}} Template:I18n month {{#if: 2009 | {{#expr: 2009 }}.}} |hu ={{#if: 2009 | {{#expr: 2009 }}. }} Template:I18n month {{#if: 9 | {{#expr: 9 }}{{#if: | | . }} }} |ja ={{#if: 2009 | {{#expr:2009}}年}}Template:I18n month{{#if: 9 |{{#expr:9}}日}} |kn =Template:I18n month {{#if: 9 | Template:Formatnum }}, Template:Formatnum |ko ={{#if: 2009 | {{#expr: 2009 }}년}} Template:I18n month {{#if: 9 |{{#expr:9}}일}} |lt ={{#if: 2009 | 2009 m. }} Template:I18n month {{#if: 9 | {{#expr: 9 }} d.}} |lv ={{#if: 2009 | {{#expr:2009}}. gada }} {{#if: 9 | {{#expr: 9 }}.}} Template:I18n month |mr =Template:I18n month {{#if: 9 | Template:Formatnum }}, इ.स. Template:Formatnum |nds ={{#if: 9 | {{#expr: 9 }}.}} Template:I18n month 2009 |new =Template:I18n month {{#if: 9 | Template:Formatnum }}, ई सं Template:Formatnum |nn ={{#if: 9 | {{#expr: 9 }}.}} Template:I18n month 2009 |no ={{#if: 9 | {{#expr: 9 }}.}} Template:I18n month 2009 |pa ={{#if: 9 | Template:Formatnum }} Template:I18n month Template:Formatnum |pl ={{#if: 9 | {{#expr: 9 }} Template:I18n month | Template:I18n month }} 2009 |pt ={{#if: 9 | {{#expr: 9 }} de }} {{#if: 1 | Template:I18n month de }} 2009 |ru ={{#if: 9 | {{#expr: 9 }} }} {{#if: 9 | Template:I18n month | Template:I18n month }} 2009 |sr ={{#if: 9 | {{#expr: 9 }}. }} Template:I18n month {{#expr: 2009 }}. |th ={{#if: 9 | {{#expr: 9 }} }} Template:I18n month {{#if: 2009 | {{#ifexpr: 2009 <= 1940 | {{#if: 1 | {{#ifexpr: 1 < 4 | พ.ศ. {{#expr: 2009 + 542 }} | พ.ศ. {{#expr: 2009 + 543 }} }} | {{#expr: 2009 + 542 }} หรือ {{#expr: 2009 + 543 }} }} | พ.ศ. {{#expr: 2009 + 543 }} }} }} |uk ={{#if: 9 | {{#expr: 9 }} }} Template:I18n month 2009 |zh ={{#if: 2009 | {{#expr:2009}}年}}Template:I18n month{{#if: 9 |{{#expr:9}}日}} |zh-hans ={{#if: 2009 | {{#expr:2009}}年}}Template:I18n month{{#if: 9 |{{#expr:9}}日}} |zh-hant ={{#if: 2009 | {{#expr:2009}}年}}Template:I18n month{{#if: 9 |{{#expr:9}}日}} |zh-cn ={{#if: 2009 | {{#expr:2009}}年}}Template:I18n month{{#if: 9 |{{#expr:9}}日}} |zh-tw ={{#if: 2009 | {{#expr:2009}}年}}Template:I18n month{{#if: 9 |{{#expr:9}}日}} |#default={{#if: 9 | {{#expr: 9 }} }} Template:I18n month 2009 }}{{#if: 2009 | (2009{{#if: 1|-01}}{{#if: 9|-09}}) }}}}

Microformat

Template:Tl also returns the date, hidden by CSS, in the ISO 8601 format needed by the hCalendar (class="dtstart") microformat. See the microformats project.|type=marker|example=|i18n-method=switch|i18n-desc=|seealso=Template:Tl – Template used to parse the date in Template:Tl; Template:Tl|setscats=|lines=one|shorthand=|relieson=Template:Tl, Template:Tl|docsub-override=|docsub-page= }}