ទំព័រគំរូ:MONTHNUMBER
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).
- ឧទាហរណ៍សម្រាប់ឈ្មោះខែជាភាសាខ្មែរ:
- {{MONTHNUMBER|ខែមករា}} returns Expression error: Unrecognized punctuation character "ខ".
- {{MONTHNUMBER|ខែកុម្ភៈ}} returns Expression error: Unrecognized punctuation character "ខ".
- {{MONTHNUMBER|ខែមីនា}} returns Expression error: Unrecognized punctuation character "ខ".
- {{MONTHNUMBER|ខែមេសា}} returns Expression error: Unrecognized punctuation character "ខ".
- {{MONTHNUMBER|ខែឧសភា}} returns Expression error: Unrecognized punctuation character "ខ".
- {{MONTHNUMBER|ខែមិថុនា}} returns Expression error: Unrecognized punctuation character "ខ".
- {{MONTHNUMBER|ខែកក្កដា}} returns Expression error: Unrecognized punctuation character "ខ".
- {{MONTHNUMBER|ខែសីហា}} returns Expression error: Unrecognized punctuation character "ខ".
- {{MONTHNUMBER|ខែកញ្ញា}} returns Expression error: Unrecognized punctuation character "ខ".
- {{MONTHNUMBER|ខែតុលា}} returns Expression error: Unrecognized punctuation character "ខ".
- {{MONTHNUMBER|ខែវិច្ឆិកា}} returns Expression error: Unrecognized punctuation character "ខ".
- {{MONTHNUMBER|ខែធ្នូ}} returns Expression error: Unrecognized punctuation character "ខ".
- ឧទាហរណ៍សម្រាប់ឈ្មោះខែខ្លីជាភាសាខ្មែរ:
- {{MONTHNUMBER|មករា}} returns Expression error: Unrecognized punctuation character "ម".
- {{MONTHNUMBER|កុម្ភៈ}} returns Expression error: Unrecognized punctuation character "ក".
- {{MONTHNUMBER|មីនា}} returns Expression error: Unrecognized punctuation character "ម".
- {{MONTHNUMBER|មេសា}} returns Expression error: Unrecognized punctuation character "ម".
- {{MONTHNUMBER|ឧសភា}} returns Expression error: Unrecognized punctuation character "ឧ".
- {{MONTHNUMBER|មិថុនា}} returns Expression error: Unrecognized punctuation character "ម".
- {{MONTHNUMBER|កក្កដា}} returns Expression error: Unrecognized punctuation character "ក".
- {{MONTHNUMBER|សីហា}} returns Expression error: Unrecognized punctuation character "ស".
- {{MONTHNUMBER|កញ្ញា}} returns Expression error: Unrecognized punctuation character "ក".
- {{MONTHNUMBER|តុលា}} returns Expression error: Unrecognized punctuation character "ត".
- {{MONTHNUMBER|វិច្ឆិកា}} returns Expression error: Unrecognized punctuation character "វ".
- {{MONTHNUMBER|ធ្នូ}} returns Expression error: Unrecognized punctuation character "ធ".
- ឧទាហរណ៍សម្រាប់លេខខែ:
- {{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
- ឧទាហរណ៍សម្រាប់លេខខែផ្ដើមដោយលេខសូន្យ:
- {{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 Expression error: Unrecognized word "xx".