Template:Check date/doc

Da Comunica.
Versione delle 19:30, 8 feb 2012, autore: 31.15.196.29 (Discussione)
(diff) ← Versione meno recente | Versione attuale (diff) | Versione più recente → (diff)

{{#ifeq: check date/doc | doc

 | 

{{

   #ifeq: show | show
   | {{
 {{#switch:
 {{#if: 
   | 
   | {{#if: 
     | 
       {{#ifeq:|
       | talk
       |  
       }}
     | 
       {{#ifeq:template|discussioni template
       | talk
       | template 
       }}
     }}
   }}

| main | = ambox | talk = tmbox | user = ombox | wikipedia = ombox | file | image = imbox | mediawiki = ombox | template = ombox | help = ombox | category = cmbox | portal = ombox | book = ombox | other | #default = ombox

}} | type = notice | image = 40px | imageright = | class = | style = | textstyle = | text = This is a documentation subpage for Template:Check date/doc.
It contains usage information, categories, interlanguage links and other content that is not part of the original {{ #if: | {{{text2}}} | {{ #if: | {{{text1}}} | {{ #ifeq: Template | Utente | template template page | {{ #if: Template |template page|article}}}}}}}}. | small = | smallimage = | smallimageright = | smalltext = | subst = | date = | name = }}

   }}{{
   #if: 
   | 
   | {{#ifexist:Template:Check date/doc|[[Category:{{
     #switch: Template
     | Template  = Template
     | User      = User
     | #default  = Wikipedia
   }} documentation pages]]|}}
 }}

| }} This template is used to check whether the given parameter is a month. It is useful for templates such as {{Multiple issues}} that sort articles into cleanup categories by month.

If the parameter is a month/date/time formatted in the way recognized by PHP's strtotime(), this template returns the month in the format Month Year, where Month is written in full and Year is written in 4 digits.

If the parameter is not a month/date/time, the empty string is returned.

Input Output
{{Check date|April 2003}} {{#iferror:{{#time:F Y|April 2003}} April 2003}}}}}}
{{Check date|2003 April}} {{#iferror:{{#time:F Y|2003 April}} 2003 April}}}}}}
{{Check date|Apr 2003}} {{#iferror:{{#time:F Y|Apr 2003}} Apr 2003}}}}}}
{{Check date|April 3 2003}} {{#iferror:{{#time:F Y|April 3 2003}} April 3 2003}}}}}}
{{Check date|April 03}} {{#iferror:{{#time:F Y|April 03}} April 03}}}}}} (thinks it is April 3 of the current year)
{{Check date|Garbage^&*text}} {{#iferror:{{#time:F Y|Garbage^&*text}} Garbage^&*text}}}}}}
Strumenti personali
Namespace
Varianti
Azioni
Navigazione
Comunicall
Rete Intelligente
TLC Software
Miscellanea
Varie
Strumenti