Jump to content

Template:MONTHNUMBER: Difference between revisions

m
no edit summary
mNo edit summary
 
mNo edit summary
Line 1: Line 1:
<includeonly>{{#if:{{{1|}}}|{{#ifexpr:{{{1|}}}<0|{{#ifexpr:({{{1|}}} round 0)!={{{1|}}}|{{#expr:(((9.5-{{{1|}}})round 0)mod 12)+1}}|{{#expr:(((8.5-{{{1|}}})round 0)mod 12)+1}}}}|{{#expr:(((10.5+{{{1|}}})round 0)mod 12)+1}}}}|Missing required parameter 1=''month''!}}</includeonly><noinclude>{{Template documentation}}
<includeonly>{{#if:{{{1|}}}|{{#ifexpr:{{{1|}}}<0|{{#ifexpr:(({{{1|}}}) round 0)!=({{{1|}}})|{{#expr:(((9.5-({{{1|}}}))round 0)mod 12)+1}}|{{#expr:(((8.5-({{{1|}}}))round 0)mod 12)+1}}}}|{{#expr:(((10.5+{{{1|}}})round 0)mod 12)+1}}}}|Missing required parameter 1=''month''!}}</includeonly><noinclude>{{Template documentation}}
This template returns the cyclic integer month number (between 1 and 12) of the month whose real number is in parameter.
This template returns the cyclic integer month number (between 1 and 12) of the month whose real number is in parameter.
; Syntax<nowiki>:</nowiki>
; Syntax<nowiki>:</nowiki>
Line 31: Line 31:


; Examples for month number underflow and overflow, from computed values<nowiki>:</nowiki>
; Examples for month number underflow and overflow, from computed values<nowiki>:</nowiki>
: <tt><nowiki>{{MONTHNUMBER|-12}}</nowiki></tt> returns {{MONTHNUMBER|-12}}
: <tt><nowiki>{{MONTHNUMBER|-11}}</nowiki></tt> returns {{MONTHNUMBER|-11}}
: <tt><nowiki>{{MONTHNUMBER|-10}}</nowiki></tt> returns {{MONTHNUMBER|-10}}
: <tt><nowiki>{{MONTHNUMBER|-9}}</nowiki></tt> returns {{MONTHNUMBER|-9}}
: <tt><nowiki>{{MONTHNUMBER|-8}}</nowiki></tt> returns {{MONTHNUMBER|-8}}
: <tt><nowiki>{{MONTHNUMBER|-7}}</nowiki></tt> returns {{MONTHNUMBER|-7}}
: <tt><nowiki>{{MONTHNUMBER|-6}}</nowiki></tt> returns {{MONTHNUMBER|-6}}
: <tt><nowiki>{{MONTHNUMBER|-5}}</nowiki></tt> returns {{MONTHNUMBER|-5}}
: <tt><nowiki>{{MONTHNUMBER|-4}}</nowiki></tt> returns {{MONTHNUMBER|-4}}
: <tt><nowiki>{{MONTHNUMBER|-3}}</nowiki></tt> returns {{MONTHNUMBER|-3}}
: <tt><nowiki>{{MONTHNUMBER|-2}}</nowiki></tt> returns {{MONTHNUMBER|-2}}
: <tt><nowiki>{{MONTHNUMBER|-1}}</nowiki></tt> returns {{MONTHNUMBER|-1}}
: <tt><nowiki>{{MONTHNUMBER|-1}}</nowiki></tt> returns {{MONTHNUMBER|-1}}
: <tt><nowiki>{{MONTHNUMBER|-0.9999}}</nowiki></tt> returns {{MONTHNUMBER|-0.9999}}
: <tt><nowiki>{{MONTHNUMBER|-0.9999}}</nowiki></tt> returns {{MONTHNUMBER|-0.9999}}
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.