Template:Age calculation templates

From Iwe

Revision as of 06:20, 8 October 2012 by IWEWrestling2012 (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)

Contents

[edit] Examples

Common age calculation templates include the following. Check similar templates to make sure you are using the right one for your article.

[edit] Age

{{age|year1|month1|day1|year2|month2|day2}} or
{{age|year1|month1|day1}}
  • Template:Age nts – for use in sortable tables
  • {{#invoke:age|age_generic|template=age_days}}
  • {{#ifeq: age calculation templates | doc
 | 

{{

   #ifeq: show | show
| {{#ifeq:|yes||}}{{#ifeq:|yes||{{#if: |}}}}{{#ifeq:|yes||{{#if: | }}}}{{#ifeq:|yes||{{#if: | }}}}{{#if:Message box
meta-templates |{{#ifeq:|yes|| }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if:
  • {{{{#if: |subst:}}ambox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}cmbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}imbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}mbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}ombox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}tmbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}asbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}dmbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}fmbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)|
}}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#ifeq:|yes||{{#switch: |none |off= |#default=}}
{{{outertitle}}}
{{{topimage}}}{{#if: |
{{{topcaption}}}
}}
{{{pretitle}}}
}}Message box
meta-templates
{{{image}}}{{#if: |
{{{caption}}}
}}
{{{above}}}
{{{heading1}}}
  • {{{{#if: |subst:}}ambox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}cmbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}imbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}mbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}ombox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}tmbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}asbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}dmbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}fmbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
{{{heading2}}}
{{{content2}}}
{{{heading3}}}
{{{content3}}}
{{{heading4}}}
{{{heading5}}}
{{{content5}}}
{{{heading6}}}
{{{content6}}}
{{{heading7}}}
{{{content7}}}
{{{heading8}}}
{{{content8}}}
{{{heading9}}}
{{{content9}}}
{{{heading10}}}
{{{content10}}}
{{{heading11}}}
{{{content11}}}
{{{heading12}}}
{{{content12}}}
{{{heading13}}}
{{{content13}}}
{{{heading14}}}
{{{content14}}}
{{{heading15}}}
{{{content15}}}
{{{heading16}}}
{{{content16}}}
{{{heading17}}}
{{{content17}}}
{{{heading18}}}
{{{content18}}}
{{{heading19}}}
{{{content19}}}
{{{heading20}}}
{{{content20}}}
{{{heading21}}}
{{{content21}}}
{{{heading22}}}
{{{content22}}}
{{{heading23}}}
{{{content23}}}
{{{heading24}}}
{{{content24}}}
{{{heading25}}}
{{{content25}}}
{{{heading26}}}
{{{content26}}}
{{{heading27}}}
{{{content27}}}
{{{heading28}}}
{{{content28}}}
{{{heading29}}}
{{{content29}}}
{{{heading30}}}
{{{content30}}}
{{{heading31}}}
{{{content31}}}
{{{heading32}}}
{{{content32}}}
{{{heading33}}}
{{{content33}}}
{{{heading34}}}
{{{content34}}}
{{{heading35}}}
{{{content35}}}
{{{below}}}
{{#switch: mbox templates

|table={ class="wikitable" !Comenius OSM and Tourism !Sl: Life Long Learning Mapping Project !Ro: Life Long Learning Mapping Project !Pt:Life Long Learning Mapping Project !Tr: Life Long Learning Mapping Project !DE: Life Long Learning Mapping Project }

|line=

|small=Template:Navigation bar

| #default =Template:Navigation bar }}


}}
   }}{{
   #if: 
   | 
   | {{#ifexist:Template:Age calculation templates|[[Category:{{
     #switch: Template
     | Template  = Template
     | User      = User
     | #default  = Wikipedia
   }} documentation pages]]|}}
 }}

| }} Template:Template shortcut This template is used to display numbers with thousands separator in a sortable table and have them numerically sorted in alphabetic sort mode. It is applied to all numbers of a column, in cases where numeric sort mode does not work or is not desired.

The supplied input numbers should not have thousands separators. Apart from the added thousands separators the numbers are formatted like supplied (scientific notation or not, leading and trailing zeros, and a zero before the decimal point or not). This formatting does not affect the sorting order except for numbers not satisfying the limitations mentioned below.

[edit] Purpose

If some table cells in a column contain text after the number, or if the numbers are preceded by some fixed text other than a currency symbol, alphabetic sorting mode is needed.

Also, formerly, for table sorting to function correctly, numbers had to be entered with not more than one thousands separator. As a workaround alphabetic sorting mode was applied, and the numbers provided with a hidden part so that alphabetic sorting corresponded with numeric sorting. Since a mix in one column of numbers formatted for alphabetic sorting and plain numbers does not allow proper sorting, adding a number in an existing table may require putting it in the format used in that column.

[edit] Method

This template automatically creates hidden code like <span style="display:none">&0000000123456789.001230</span> before the actual displayed number. The preceding ampersand forces the sorting routine to use text sort. The routine sorts the total text without the tags, which corresponds to numeric sorting due to the leading zeros.

[edit] Limitations

  • Negative numbers do not sort correctly with this template: while they correctly come at the low end, mutually they are sorted in reverse order (i.e., in the order of the absolute value).
  • The maximum number is 1Template:E. While larger numbers correctly come at the high end, they are mutually sorted alphabetically.
  • There is a maximum of 6 digits after the decimal separator. When using a consistent non-scientific notation numbers with more than 6 digits after the decimal separator still sort correctly. They sort correctly with respect to 0 if they are written with the zero before the decimal point.
  • In the case of text before a number, the entry is positioned like 1Template:E. If there are more of such entries they are mutually sorted alphabetically (primarily based on the text).

[edit] Parameters

The template has only one required parameter: a real number without thousand separators.

Optional parameters

[edit] Example

{{Nts|123456789.00123}}

expands to

 <span style="display:none">&0000000123456789.001230</span> 123,456,789.00123 

which is rendered as Template loop detected: Template:Nts

[edit] More examples

Below are more examples, also illustrating the limitations mentioned above.

Note: Javascript sorting order: &+,-.0123456789Ee~

sortkey and number
Template loop detected: Template:Nts
Template loop detected: Template:Nts
Template loop detected: Template:Nts
Template loop detected: Template:Nts
Template loop detected: Template:Nts
Template loop detected: Template:Nts
Template loop detected: Template:Nts
Template loop detected: Template:Nts
Template loop detected: Template:Nts
Template loop detected: Template:Nts
Template loop detected: Template:Nts
Template loop detected: Template:Nts
Template loop detected: Template:Nts
Template loop detected: Template:Nts
Template loop detected: Template:Nts
Template loop detected: Template:Nts
Template loop detected: Template:Nts
Template loop detected: Template:Nts
Template loop detected: Template:Nts
Template loop detected: Template:Nts
Template loop detected: Template:Nts
Template loop detected: Template:Nts
Template loop detected: Template:Nts
Template loop detected: Template:Nts
Template loop detected: Template:Nts
Template loop detected: Template:Nts
Template loop detected: Template:Nts
Template loop detected: Template:Nts
Template loop detected: Template:Nts
Template loop detected: Template:Nts
Template loop detected: Template:Nts
Template loop detected: Template:Nts
Template loop detected: Template:Nts
Template loop detected: Template:Nts
Template loop detected: Template:Nts
Template loop detected: Template:Nts
Template loop detected: Template:Nts
Template loop detected: Template:Nts

[edit] See also

  • {{Ntsh}} - same as Nts, but does not display the number
  • {{Ntsc}} - for converted units, sorts by the first number
  • {{Ntss}} - same as Nts, but allows for the number to be scaled
  • {{Dts}} - for sorting dates
  • {{Sms}} - Probably a duplicate of {{Ntsh}}de:Vorlage:Nts

fi:Malline:Nts ja:Template:Nts mr:साचा:Nts pl:Szablon:L ru:Template:Nts sv:Mall:Nts

– for use in sortable tables
  • WP:SAFESUBST
  • This template returns the number of full years and surplus days between two specified dates. If the second set of parameters is not included, it will return the number of full years and surplus days between a specified date and today's date. The two numbers are separated by the word "and"; the words "year" and "day" are plural when appropriate. The {{nts}} template is included in the year value, so that values produced by this template will work properly in sortable lists. See Wikipedia:Age calculation templates for more information on using this kind of template.
Syntax:
{{Age in years and days textual version|year1|month1|day1|year2|month2|day2}} or
{{Age in years and days textual version|year1|month1|day1}}
Examples:
{{Age in years and days textual version|1989|07|23|2003|07|14}} returns "WP:SAFESUBST
"
{{Age in years and days textual version|1989|07|23}} returns "Template loop detected: Template:Age in years and days textual version"
{{Age in years and days textual version|1989|07|23|1990|07|24}} returns "Template loop detected: Template:Age in years and days textual version"
Note:
This template does not check for incorrect input:
{{Age in years and days textual version|1980|07|14|1993|06|233}} returns "Template loop detected: Template:Age in years and days textual version" (surplus days do not count as extra months)
{{Age in years and days textual version|1980|07|14|1993|88|14}} returns "Template loop detected: Template:Age in years and days textual version" (surplus months do not count as extra years)

Note also that due to leap years the measure "years and days" fails to be fully additive. The following example is not an error, but each calculation uses a different definition of "year", either 365 days or 366:

{{Age in years and days textual version|2007|02|27|2008|03|02}} returns "Template loop detected: Template:Age in years and days textual version"

but split up:

{{Age in years and days textual version|2007|02|27|2007|03|02}} returns "Template loop detected: Template:Age in years and days textual version"
{{Age in years and days textual version|2007|03|02|2008|03|02}} returns "Template loop detected: Template:Age in years and days textual version" - for when you want to use a period in years and days in text
       + {{#expr: 
       + ((2024 - 1) * 365)
       + (((2024 - 1) - ((2024 - 1) mod 4)) / 4)     
       - (((2024 - 1) - ((2024 - 1) mod 100)) / 100) 
       + (((2024 - 1) - ((2024 - 1) mod 400)) / 400) 


       + {{ #ifexpr:     
                    (10 - 1) < 8 
                    | ( (10 - 1) * 30.5 round 0) 
                    | ( (10 - 1) * 30.5 + 0.9 round 0 ) 
         }} 
       - {{ #ifexpr: (10 <= 2) | 0 |  
            {{ #ifexpr:    
                    (2024 / 4) = (2024 / 4 round 0)          
                     and (2024 / 100 != 2024 / 100 round 0)  
               | 1 | 2 
            }}
         }}
       + {{ #ifexpr: (10 <= 2) | 0 |
            {{ #ifexpr: 
                    (2024 / 400) = (2024 / 400 round 0) 
               | 1 | 0 
            }}
         }} 
       + 15
}}{{#ifexpr: 2024 < 1 |
       _ERROR - Can not handle dates before January 1, 1 A.D.
  }}
       - {{#expr: 
       + ((2024 - 1) * 365)
       + (((2024 - 1) - ((2024 - 1) mod 4)) / 4)     
       - (((2024 - 1) - ((2024 - 1) mod 100)) / 100) 
       + (((2024 - 1) - ((2024 - 1) mod 400)) / 400) 


       + {{ #ifexpr:     
                    (10 - 1) < 8 
                    | ( (10 - 1) * 30.5 round 0) 
                    | ( (10 - 1) * 30.5 + 0.9 round 0 ) 
         }} 
       - {{ #ifexpr: (10 <= 2) | 0 |  
            {{ #ifexpr:    
                    (2024 / 4) = (2024 / 4 round 0)          
                     and (2024 / 100 != 2024 / 100 round 0)  
               | 1 | 2 
            }}
         }}
       + {{ #ifexpr: (10 <= 2) | 0 |
            {{ #ifexpr: 
                    (2024 / 400) = (2024 / 400 round 0) 
               | 1 | 0 
            }}
         }} 
       + 15
}}{{#ifexpr: 2024 < 1 |
       _ERROR - Can not handle dates before January 1, 1 A.D.
  }} }}
  • {{#ifeq: age calculation templates | doc
 | 

{{

   #ifeq: show | show
| {{#ifeq:|yes||}}{{#ifeq:|yes||{{#if: |}}}}{{#ifeq:|yes||{{#if: | }}}}{{#ifeq:|yes||{{#if: | }}}}{{#if:Message box
meta-templates |{{#ifeq:|yes|| }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if:
  • {{{{#if: |subst:}}ambox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}cmbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}imbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}mbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}ombox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}tmbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}asbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}dmbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}fmbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)|
}}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#ifeq:|yes||{{#switch: |none |off= |#default=}}
{{{outertitle}}}
{{{topimage}}}{{#if: |
{{{topcaption}}}
}}
{{{pretitle}}}
}}Message box
meta-templates
{{{image}}}{{#if: |
{{{caption}}}
}}
{{{above}}}
{{{heading1}}}
  • {{{{#if: |subst:}}ambox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}cmbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}imbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}mbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}ombox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}tmbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}asbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}dmbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}fmbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
{{{heading2}}}
{{{content2}}}
{{{heading3}}}
{{{content3}}}
{{{heading4}}}
{{{heading5}}}
{{{content5}}}
{{{heading6}}}
{{{content6}}}
{{{heading7}}}
{{{content7}}}
{{{heading8}}}
{{{content8}}}
{{{heading9}}}
{{{content9}}}
{{{heading10}}}
{{{content10}}}
{{{heading11}}}
{{{content11}}}
{{{heading12}}}
{{{content12}}}
{{{heading13}}}
{{{content13}}}
{{{heading14}}}
{{{content14}}}
{{{heading15}}}
{{{content15}}}
{{{heading16}}}
{{{content16}}}
{{{heading17}}}
{{{content17}}}
{{{heading18}}}
{{{content18}}}
{{{heading19}}}
{{{content19}}}
{{{heading20}}}
{{{content20}}}
{{{heading21}}}
{{{content21}}}
{{{heading22}}}
{{{content22}}}
{{{heading23}}}
{{{content23}}}
{{{heading24}}}
{{{content24}}}
{{{heading25}}}
{{{content25}}}
{{{heading26}}}
{{{content26}}}
{{{heading27}}}
{{{content27}}}
{{{heading28}}}
{{{content28}}}
{{{heading29}}}
{{{content29}}}
{{{heading30}}}
{{{content30}}}
{{{heading31}}}
{{{content31}}}
{{{heading32}}}
{{{content32}}}
{{{heading33}}}
{{{content33}}}
{{{heading34}}}
{{{content34}}}
{{{heading35}}}
{{{content35}}}
{{{below}}}
{{#switch: mbox templates

|table={ class="wikitable" !Comenius OSM and Tourism !Sl: Life Long Learning Mapping Project !Ro: Life Long Learning Mapping Project !Pt:Life Long Learning Mapping Project !Tr: Life Long Learning Mapping Project !DE: Life Long Learning Mapping Project }

|line=

|small=Template:Navigation bar

| #default =Template:Navigation bar }}


}}
   }}{{
   #if: 
   | 
   | {{#ifexist:Template:Age calculation templates|[[Category:{{
     #switch: Template
     | Template  = Template
     | User      = User
     | #default  = Wikipedia
   }} documentation pages]]|}}
 }}

| }}

This template returns the number of months, weeks and days that have elapsed between two dates.

[edit] Usage

Usage: {{Age calculation templates |month1= |day1= |year1= |month2= |day2= | year2=}}

|

{{age|year1|month1|day1|year2|month2|day2}} or
{{age|year1|month1|day1}} {{safesubst:plural:
{{age|year1|month1|day1|year2|month2|day2}} or
{{age|year1|month1|day1}}|{{#ifeq:no|yes|yr|year}}|{{#ifeq:no|yes|yr|year}}s|{{{4}}}}}

|{{#ifexpr:Template:Age in months>=12 |

{{age|year1|month1|day1|year2|month2|day2}} or
{{age|year1|month1|day1}} {{safesubst:plural:
{{age|year1|month1|day1|year2|month2|day2}} or
{{age|year1|month1|day1}}|{{#ifeq:no|yes|yr|year}}|{{#ifeq:no|yes|yr|year}}s|{{{4}}}}} {{#expr:(Template:Age in months) mod 12}} {{safesubst:plural:{{#expr:(Template:Age in months) mod 12}}|{{#ifeq:no|yes|mo|month}}|{{#ifeq:no|yes|mo|month}}s|{{{4}}}}}

|{{#ifeq:Template:Age in months|0||Template:Age in months {{safesubst:plural:Template:Age in months|{{#ifeq:no|yes|mo|month}}|{{#ifeq:no|yes|mo|month}}s|{{{4}}}}}}} {{#expr:15-{{{3}}}+{{#ifexpr:15>={{{3}}}|0|Template:Days in month}}}} {{safesubst:plural:{{#expr:15-{{{3}}}+{{#ifexpr:15>={{{3}}}|0|Template:Days in month}}}}|{{#ifeq:no|yes|day|day}}|{{#ifeq:no|yes|day|day}}s|{{{4}}}}} }}}} – displays months and days up to one year, years and months up to three years, and years beyond

[edit] Dates

  • ({{{year}}}-{{{month}}}-{{{day}}}) {{#if:|{{#expr:{{{day}}}}} {{#if:{{{month}}}|{{#switch:{{#ifeq: age calculation templates | doc
 | 

{{

   #ifeq: show | show
| {{#ifeq:|yes||}}{{#ifeq:|yes||{{#if: |}}}}{{#ifeq:|yes||{{#if: | }}}}{{#ifeq:|yes||{{#if: | }}}}{{#if:Message box
meta-templates |{{#ifeq:|yes|| }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if:
  • {{{{#if: |subst:}}ambox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}cmbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}imbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}mbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}ombox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}tmbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}asbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}dmbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}fmbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)|
}}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#ifeq:|yes||{{#switch: |none |off= |#default=}}
{{{outertitle}}}
{{{topimage}}}{{#if: |
{{{topcaption}}}
}}
{{{pretitle}}}
}}Message box
meta-templates
{{{image}}}{{#if: |
{{{caption}}}
}}
{{{above}}}
{{{heading1}}}
  • {{{{#if: |subst:}}ambox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}cmbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}imbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}mbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}ombox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}tmbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}asbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}dmbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}fmbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
{{{heading2}}}
{{{content2}}}
{{{heading3}}}
{{{content3}}}
{{{heading4}}}
{{{heading5}}}
{{{content5}}}
{{{heading6}}}
{{{content6}}}
{{{heading7}}}
{{{content7}}}
{{{heading8}}}
{{{content8}}}
{{{heading9}}}
{{{content9}}}
{{{heading10}}}
{{{content10}}}
{{{heading11}}}
{{{content11}}}
{{{heading12}}}
{{{content12}}}
{{{heading13}}}
{{{content13}}}
{{{heading14}}}
{{{content14}}}
{{{heading15}}}
{{{content15}}}
{{{heading16}}}
{{{content16}}}
{{{heading17}}}
{{{content17}}}
{{{heading18}}}
{{{content18}}}
{{{heading19}}}
{{{content19}}}
{{{heading20}}}
{{{content20}}}
{{{heading21}}}
{{{content21}}}
{{{heading22}}}
{{{content22}}}
{{{heading23}}}
{{{content23}}}
{{{heading24}}}
{{{content24}}}
{{{heading25}}}
{{{content25}}}
{{{heading26}}}
{{{content26}}}
{{{heading27}}}
{{{content27}}}
{{{heading28}}}
{{{content28}}}
{{{heading29}}}
{{{content29}}}
{{{heading30}}}
{{{content30}}}
{{{heading31}}}
{{{content31}}}
{{{heading32}}}
{{{content32}}}
{{{heading33}}}
{{{content33}}}
{{{heading34}}}
{{{content34}}}
{{{heading35}}}
{{{content35}}}
{{{below}}}
{{#switch: mbox templates

|table={ class="wikitable" !Comenius OSM and Tourism !Sl: Life Long Learning Mapping Project !Ro: Life Long Learning Mapping Project !Pt:Life Long Learning Mapping Project !Tr: Life Long Learning Mapping Project !DE: Life Long Learning Mapping Project }

|line=

|small=Template:Navigation bar

| #default =Template:Navigation bar }}


}}
   }}{{
   #if: 
   | 
   | {{#ifexist:Template:Age calculation templates|[[Category:{{
     #switch: Template
     | Template  = Template
     | User      = User
     | #default  = Wikipedia
   }} documentation pages]]|}}
 }}

| }} Template:High-risk

This template returns the cyclic integer month number (between 1 and 12) of the month whose real number is in parameter. Alternatively, the month can be given with its English name (complete or abbreviated to 3 characters, with capitals or small letters).

Does not play nicely with "subst:"

Syntax:
{{MONTHNUMBER|month}}
  • The month value is interpreted modulo 12 (extra leading zeroes are ignored, negative numbers are accepted, all numbers are rounded to floor).
Examples for all standard English month names:
{{MONTHNUMBER|january}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|february}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|march}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|april}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|may}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|june}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|july}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|august}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|september}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|october}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|november}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|december}} returns Template loop detected: Template:MONTHNUMBER
Examples for all abbreviated English month names:
{{MONTHNUMBER|jan}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|feb}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|mar}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|apr}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|may}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|jun}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|jul}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|aug}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|sep}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|oct}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|nov}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|dec}} returns Template loop detected: Template:MONTHNUMBER
Examples for all standard month numbers:
{{MONTHNUMBER|1}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|2}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|3}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|4}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|5}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|6}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|7}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|8}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|9}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|10}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|11}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|12}} returns Template loop detected: Template:MONTHNUMBER
Examples for month numbers with extra leading zero:
{{MONTHNUMBER|01}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|02}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|03}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|04}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|05}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|06}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|07}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|08}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|09}} returns Template loop detected: Template:MONTHNUMBER
Examples for month number underflows and overflows, from computed values:
{{MONTHNUMBER|-1200}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|-1201}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|-1212}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|-12}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|-11}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|-10}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|-9}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|-8}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|-7}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|-6}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|-5}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|-4}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|-3}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|-2}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|-1}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|-0.9999}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|-0.5}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|-0.0001}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|0}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|0.0001}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|0.5}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|0.9999}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|12.0001}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|12.5}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|12.9999}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|13}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|14}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|24}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|1200}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|1201}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|1212}} returns Template loop detected: Template:MONTHNUMBER
Example for invalid month name:
{{MONTHNUMBER|xx}} returns Template loop detected: Template:MONTHNUMBER

[edit] See also

|1=January|2=February|3=March|4=April|5=May|6=June|7=July|8=August|9=September|10=October|11=November|12=December|Incorrect required parameter 1=month!}}|Missing required parameter 1=month!}}|{{#if:{{{month}}}|{{#switch:{{#ifeq: age calculation templates | doc

 | 

{{

   #ifeq: show | show
| {{#ifeq:|yes||}}{{#ifeq:|yes||{{#if: |}}}}{{#ifeq:|yes||{{#if: | }}}}{{#ifeq:|yes||{{#if: | }}}}{{#if:Message box
meta-templates |{{#ifeq:|yes|| }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if:
  • {{{{#if: |subst:}}ambox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}cmbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}imbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}mbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}ombox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}tmbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}asbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}dmbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}fmbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)|
}}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#if: | }}{{#ifeq:|yes||{{#switch: |none |off= |#default=}}
{{{outertitle}}}
{{{topimage}}}{{#if: |
{{{topcaption}}}
}}
{{{pretitle}}}
}}Message box
meta-templates
{{{image}}}{{#if: |
{{{caption}}}
}}
{{{above}}}
{{{heading1}}}
  • {{{{#if: |subst:}}ambox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}cmbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}imbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}mbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}ombox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}tmbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}asbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}dmbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
  • {{{{#if: |subst:}}fmbox{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} (t)
{{{heading2}}}
{{{content2}}}
{{{heading3}}}
{{{content3}}}
{{{heading4}}}
{{{heading5}}}
{{{content5}}}
{{{heading6}}}
{{{content6}}}
{{{heading7}}}
{{{content7}}}
{{{heading8}}}
{{{content8}}}
{{{heading9}}}
{{{content9}}}
{{{heading10}}}
{{{content10}}}
{{{heading11}}}
{{{content11}}}
{{{heading12}}}
{{{content12}}}
{{{heading13}}}
{{{content13}}}
{{{heading14}}}
{{{content14}}}
{{{heading15}}}
{{{content15}}}
{{{heading16}}}
{{{content16}}}
{{{heading17}}}
{{{content17}}}
{{{heading18}}}
{{{content18}}}
{{{heading19}}}
{{{content19}}}
{{{heading20}}}
{{{content20}}}
{{{heading21}}}
{{{content21}}}
{{{heading22}}}
{{{content22}}}
{{{heading23}}}
{{{content23}}}
{{{heading24}}}
{{{content24}}}
{{{heading25}}}
{{{content25}}}
{{{heading26}}}
{{{content26}}}
{{{heading27}}}
{{{content27}}}
{{{heading28}}}
{{{content28}}}
{{{heading29}}}
{{{content29}}}
{{{heading30}}}
{{{content30}}}
{{{heading31}}}
{{{content31}}}
{{{heading32}}}
{{{content32}}}
{{{heading33}}}
{{{content33}}}
{{{heading34}}}
{{{content34}}}
{{{heading35}}}
{{{content35}}}
{{{below}}}
{{#switch: mbox templates

|table={ class="wikitable" !Comenius OSM and Tourism !Sl: Life Long Learning Mapping Project !Ro: Life Long Learning Mapping Project !Pt:Life Long Learning Mapping Project !Tr: Life Long Learning Mapping Project !DE: Life Long Learning Mapping Project }

|line=

|small=Template:Navigation bar

| #default =Template:Navigation bar }}


}}
   }}{{
   #if: 
   | 
   | {{#ifexist:Template:Age calculation templates|[[Category:{{
     #switch: Template
     | Template  = Template
     | User      = User
     | #default  = Wikipedia
   }} documentation pages]]|}}
 }}

| }} Template:High-risk

This template returns the cyclic integer month number (between 1 and 12) of the month whose real number is in parameter. Alternatively, the month can be given with its English name (complete or abbreviated to 3 characters, with capitals or small letters).

Does not play nicely with "subst:"

Syntax:
{{MONTHNUMBER|month}}
  • The month value is interpreted modulo 12 (extra leading zeroes are ignored, negative numbers are accepted, all numbers are rounded to floor).
Examples for all standard English month names:
{{MONTHNUMBER|january}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|february}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|march}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|april}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|may}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|june}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|july}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|august}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|september}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|october}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|november}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|december}} returns Template loop detected: Template:MONTHNUMBER
Examples for all abbreviated English month names:
{{MONTHNUMBER|jan}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|feb}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|mar}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|apr}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|may}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|jun}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|jul}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|aug}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|sep}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|oct}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|nov}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|dec}} returns Template loop detected: Template:MONTHNUMBER
Examples for all standard month numbers:
{{MONTHNUMBER|1}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|2}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|3}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|4}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|5}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|6}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|7}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|8}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|9}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|10}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|11}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|12}} returns Template loop detected: Template:MONTHNUMBER
Examples for month numbers with extra leading zero:
{{MONTHNUMBER|01}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|02}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|03}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|04}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|05}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|06}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|07}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|08}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|09}} returns Template loop detected: Template:MONTHNUMBER
Examples for month number underflows and overflows, from computed values:
{{MONTHNUMBER|-1200}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|-1201}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|-1212}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|-12}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|-11}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|-10}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|-9}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|-8}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|-7}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|-6}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|-5}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|-4}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|-3}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|-2}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|-1}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|-0.9999}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|-0.5}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|-0.0001}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|0}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|0.0001}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|0.5}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|0.9999}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|12.0001}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|12.5}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|12.9999}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|13}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|14}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|24}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|1200}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|1201}} returns Template loop detected: Template:MONTHNUMBER
{{MONTHNUMBER|1212}} returns Template loop detected: Template:MONTHNUMBER
Example for invalid month name:
{{MONTHNUMBER|xx}} returns Template loop detected: Template:MONTHNUMBER

[edit] See also

|1=January|2=February|3=March|4=April|5=May|6=June|7=July|8=August|9=September|10=October|11=November|12=December|Incorrect required parameter 1=month!}}|Missing required parameter 1=month!}} {{#expr:{{{day}}}}},}} {{{year}}} (age 

{{age|year1|month1|day1|year2|month2|day2}} or
{{age|year1|month1|day1}}){{#ifexpr: ( {{{year}}} > 2024 ) OR ( 2024 - {{{year}}} > 150 )
|  Template:Error{{#switch:
 {{#if: 
 | {{{demospace}}}    
 | {{#ifeq:Template|
   | main
   | other
   }} 
 }}

| main = | other | #default = }} }}{{#ifexpr: ( {{{month}}} > 12 ) OR ( {{{month}}} < 1 )

|  Template:Error{{#switch:
 {{#if: 
 | {{{demospace}}}    
 | {{#ifeq:Template|
   | main
   | other
   }} 
 }}

| main = | other | #default = }} }}{{#ifexpr: ( {{{day}}} > 31 ) OR ( {{{day}}} < 1 )

|  Template:Error{{#switch:
 {{#if: 
 | {{{demospace}}}    
 | {{#ifeq:Template|
   | main
   | other
   }} 
 }}

| main = | other | #default = }} }}

Personal tools