Diferencia entre revisiones de «Plantilla:MONTHNUMBER/doc Ver historial

m (Created Redirect)
 
(Página creada con «{{Documentation subpage}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> This template returns the cyclic integer month number (between 1 and 12)...»)
 
(No se muestra una edición intermedia de otro usuario)
Línea 1: Línea 1:
#REDIRECT [[Creating_and_Editing_street_segments#Confirm_the_road_by_updating_details]]
{{Documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
 
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<nowiki>:</nowiki>
: <tt><nowiki>{{</nowiki>MONTHNUMBER|</tt>''month''<tt>}}</tt>
* 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<nowiki>:</nowiki>
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|january}}</nowiki></tt> returns {{MONTHNUMBER|january}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|february}}</nowiki></tt> returns {{MONTHNUMBER|february}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|march}}</nowiki></tt> returns {{MONTHNUMBER|march}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|april}}</nowiki></tt> returns {{MONTHNUMBER|april}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|may}}</nowiki></tt> returns {{MONTHNUMBER|may}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|june}}</nowiki></tt> returns {{MONTHNUMBER|june}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|july}}</nowiki></tt> returns {{MONTHNUMBER|july}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|august}}</nowiki></tt> returns {{MONTHNUMBER|august}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|september}}</nowiki></tt> returns {{MONTHNUMBER|september}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|october}}</nowiki></tt> returns {{MONTHNUMBER|october}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|november}}</nowiki></tt> returns {{MONTHNUMBER|november}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|december}}</nowiki></tt> returns {{MONTHNUMBER|december}}
 
; Examples for all abbreviated English month names<nowiki>:</nowiki>
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|jan}}</nowiki></tt> returns {{MONTHNUMBER|jan}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|feb}}</nowiki></tt> returns {{MONTHNUMBER|feb}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|mar}}</nowiki></tt> returns {{MONTHNUMBER|mar}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|apr}}</nowiki></tt> returns {{MONTHNUMBER|apr}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|may}}</nowiki></tt> returns {{MONTHNUMBER|may}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|jun}}</nowiki></tt> returns {{MONTHNUMBER|jun}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|jul}}</nowiki></tt> returns {{MONTHNUMBER|jul}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|aug}}</nowiki></tt> returns {{MONTHNUMBER|aug}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|sep}}</nowiki></tt> returns {{MONTHNUMBER|sep}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|oct}}</nowiki></tt> returns {{MONTHNUMBER|oct}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|nov}}</nowiki></tt> returns {{MONTHNUMBER|nov}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|dec}}</nowiki></tt> returns {{MONTHNUMBER|dec}}
 
; Examples for all standard month numbers<nowiki>:</nowiki>
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|1}}</nowiki></tt> returns {{MONTHNUMBER|1}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|2}}</nowiki></tt> returns {{MONTHNUMBER|2}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|3}}</nowiki></tt> returns {{MONTHNUMBER|3}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|4}}</nowiki></tt> returns {{MONTHNUMBER|4}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|5}}</nowiki></tt> returns {{MONTHNUMBER|5}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|6}}</nowiki></tt> returns {{MONTHNUMBER|6}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|7}}</nowiki></tt> returns {{MONTHNUMBER|7}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|8}}</nowiki></tt> returns {{MONTHNUMBER|8}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|9}}</nowiki></tt> returns {{MONTHNUMBER|9}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|10}}</nowiki></tt> returns {{MONTHNUMBER|10}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|11}}</nowiki></tt> returns {{MONTHNUMBER|11}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|12}}</nowiki></tt> returns {{MONTHNUMBER|12}}
 
; Examples for month numbers with extra leading zero<nowiki>:</nowiki>
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|01}}</nowiki></tt> returns {{MONTHNUMBER|01}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|02}}</nowiki></tt> returns {{MONTHNUMBER|02}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|03}}</nowiki></tt> returns {{MONTHNUMBER|03}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|04}}</nowiki></tt> returns {{MONTHNUMBER|04}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|05}}</nowiki></tt> returns {{MONTHNUMBER|05}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|06}}</nowiki></tt> returns {{MONTHNUMBER|06}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|07}}</nowiki></tt> returns {{MONTHNUMBER|07}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|08}}</nowiki></tt> returns {{MONTHNUMBER|08}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|09}}</nowiki></tt> returns {{MONTHNUMBER|09}}
 
; Examples for month number underflows and overflows, from computed values<nowiki>:</nowiki>
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|-1200}}</nowiki></tt> returns {{MONTHNUMBER|-1200}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|-1201}}</nowiki></tt> returns {{MONTHNUMBER|-1201}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|-1212}}</nowiki></tt> returns {{MONTHNUMBER|-1212}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|-12}}</nowiki></tt> returns {{MONTHNUMBER|-12}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|-11}}</nowiki></tt> returns {{MONTHNUMBER|-11}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|-10}}</nowiki></tt> returns {{MONTHNUMBER|-10}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|-9}}</nowiki></tt> returns {{MONTHNUMBER|-9}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|-8}}</nowiki></tt> returns {{MONTHNUMBER|-8}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|-7}}</nowiki></tt> returns {{MONTHNUMBER|-7}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|-6}}</nowiki></tt> returns {{MONTHNUMBER|-6}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|-5}}</nowiki></tt> returns {{MONTHNUMBER|-5}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|-4}}</nowiki></tt> returns {{MONTHNUMBER|-4}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|-3}}</nowiki></tt> returns {{MONTHNUMBER|-3}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|-2}}</nowiki></tt> returns {{MONTHNUMBER|-2}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|-1}}</nowiki></tt> returns {{MONTHNUMBER|-1}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|-0.9999}}</nowiki></tt> returns {{MONTHNUMBER|-0.9999}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|-0.5}}</nowiki></tt> returns {{MONTHNUMBER|-0.5}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|-0.0001}}</nowiki></tt> returns {{MONTHNUMBER|-0.0001}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|0}}</nowiki></tt> returns {{MONTHNUMBER|0}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|0.0001}}</nowiki></tt> returns {{MONTHNUMBER|0.0001}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|0.5}}</nowiki></tt> returns {{MONTHNUMBER|0}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|0.9999}}</nowiki></tt> returns {{MONTHNUMBER|0.9999}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|12.0001}}</nowiki></tt> returns {{MONTHNUMBER|12.0001}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|12.5}}</nowiki></tt> returns {{MONTHNUMBER|12.5}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|12.9999}}</nowiki></tt> returns {{MONTHNUMBER|12.9999}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|13}}</nowiki></tt> returns {{MONTHNUMBER|13}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|14}}</nowiki></tt> returns {{MONTHNUMBER|14}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|24}}</nowiki></tt> returns {{MONTHNUMBER|24}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|1200}}</nowiki></tt> returns {{MONTHNUMBER|1200}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|1201}}</nowiki></tt> returns {{MONTHNUMBER|1201}}
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|1212}}</nowiki></tt> returns {{MONTHNUMBER|1212}}
 
; Example for invalid month name<nowiki>:</nowiki>
: <tt><nowiki>{{</nowiki>MONTHNUMBER<nowiki>|xx}}</nowiki></tt> returns {{MONTHNUMBER|xx}}
 
=== See also ===
 
* [[Template:MONTHNAME]]
* [[Template:MONTHABBREV]]
* [[Template:MONTH]]
 
<includeonly>
<!-- ADD CATEGORIES BELOW THIS LINE -->
[[Category:Date-computing templates|{{PAGENAME}}]]
</includeonly>

Revisión actual - 18:03 5 jul 2017

This is a documentation subpage for Plantilla:MONTHNUMBER.
It contains usage information, categories and other content that is not part of the original plantilla page.

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 1
{{MONTHNUMBER|february}} returns 2
{{MONTHNUMBER|march}} returns 3
{{MONTHNUMBER|april}} returns 4
{{MONTHNUMBER|may}} returns 5
{{MONTHNUMBER|june}} returns 6
{{MONTHNUMBER|july}} returns 7
{{MONTHNUMBER|august}} returns 8
{{MONTHNUMBER|september}} returns 9
{{MONTHNUMBER|october}} returns 10
{{MONTHNUMBER|november}} returns 11
{{MONTHNUMBER|december}} returns 12
Examples for all abbreviated English month names:
{{MONTHNUMBER|jan}} returns 1
{{MONTHNUMBER|feb}} returns 2
{{MONTHNUMBER|mar}} returns 3
{{MONTHNUMBER|apr}} returns 4
{{MONTHNUMBER|may}} returns 5
{{MONTHNUMBER|jun}} returns 6
{{MONTHNUMBER|jul}} returns 7
{{MONTHNUMBER|aug}} returns 8
{{MONTHNUMBER|sep}} returns 9
{{MONTHNUMBER|oct}} returns 10
{{MONTHNUMBER|nov}} returns 11
{{MONTHNUMBER|dec}} returns 12
Examples for all standard month numbers:
{{MONTHNUMBER|1}} returns 1
{{MONTHNUMBER|2}} returns 2
{{MONTHNUMBER|3}} returns 3
{{MONTHNUMBER|4}} returns 4
{{MONTHNUMBER|5}} returns 5
{{MONTHNUMBER|6}} returns 6
{{MONTHNUMBER|7}} returns 7
{{MONTHNUMBER|8}} returns 8
{{MONTHNUMBER|9}} returns 9
{{MONTHNUMBER|10}} returns 10
{{MONTHNUMBER|11}} returns 11
{{MONTHNUMBER|12}} returns 12
Examples for month numbers with extra leading zero:
{{MONTHNUMBER|01}} returns 1
{{MONTHNUMBER|02}} returns 2
{{MONTHNUMBER|03}} returns 3
{{MONTHNUMBER|04}} returns 4
{{MONTHNUMBER|05}} returns 5
{{MONTHNUMBER|06}} returns 6
{{MONTHNUMBER|07}} returns 7
{{MONTHNUMBER|08}} returns 8
{{MONTHNUMBER|09}} returns 9
Examples for month number underflows and overflows, from computed values:
{{MONTHNUMBER|-1200}} returns 12
{{MONTHNUMBER|-1201}} returns 11
{{MONTHNUMBER|-1212}} returns 12
{{MONTHNUMBER|-12}} returns 12
{{MONTHNUMBER|-11}} returns 1
{{MONTHNUMBER|-10}} returns 2
{{MONTHNUMBER|-9}} returns 3
{{MONTHNUMBER|-8}} returns 4
{{MONTHNUMBER|-7}} returns 5
{{MONTHNUMBER|-6}} returns 6
{{MONTHNUMBER|-5}} returns 7
{{MONTHNUMBER|-4}} returns 8
{{MONTHNUMBER|-3}} returns 9
{{MONTHNUMBER|-2}} returns 10
{{MONTHNUMBER|-1}} returns 11
{{MONTHNUMBER|-0.9999}} returns 11
{{MONTHNUMBER|-0.5}} returns 11
{{MONTHNUMBER|-0.0001}} returns 11
{{MONTHNUMBER|0}} returns 12
{{MONTHNUMBER|0.0001}} returns 12
{{MONTHNUMBER|0.5}} returns 12
{{MONTHNUMBER|0.9999}} returns 12
{{MONTHNUMBER|12.0001}} returns 12
{{MONTHNUMBER|12.5}} returns 12
{{MONTHNUMBER|12.9999}} returns 12
{{MONTHNUMBER|13}} returns 1
{{MONTHNUMBER|14}} returns 2
{{MONTHNUMBER|24}} returns 12
{{MONTHNUMBER|1200}} returns 12
{{MONTHNUMBER|1201}} returns 1
{{MONTHNUMBER|1212}} returns 12
Example for invalid month name:
{{MONTHNUMBER|xx}} returns Error en la expresión: no se reconoce la palabra «xx».

See also