Index: trunk/phase3/includes/parser/Parser.php |
— | — | @@ -2341,6 +2341,7 @@ |
2342 | 2342 | wfSuppressWarnings(); // E_STRICT system time bitching |
2343 | 2343 | $localTimestamp = date( 'YmdHis', $ts ); |
2344 | 2344 | $localMonth = date( 'm', $ts ); |
| 2345 | + $localMonth1 = date( 'n', $ts ); |
2345 | 2346 | $localMonthName = date( 'n', $ts ); |
2346 | 2347 | $localDay = date( 'j', $ts ); |
2347 | 2348 | $localDay2 = date( 'd', $ts ); |
— | — | @@ -2356,6 +2357,8 @@ |
2357 | 2358 | switch ( $index ) { |
2358 | 2359 | case 'currentmonth': |
2359 | 2360 | return $this->mVarCache[$index] = $wgContLang->formatNum( gmdate( 'm', $ts ) ); |
| 2361 | + case 'currentmonth1': |
| 2362 | + return $this->mVarCache[$index] = $wgContLang->formatNum( gmdate( 'n', $ts ) ); |
2360 | 2363 | case 'currentmonthname': |
2361 | 2364 | return $this->mVarCache[$index] = $wgContLang->getMonthName( gmdate( 'n', $ts ) ); |
2362 | 2365 | case 'currentmonthnamegen': |
— | — | @@ -2368,6 +2371,8 @@ |
2369 | 2372 | return $this->mVarCache[$index] = $wgContLang->formatNum( gmdate( 'd', $ts ) ); |
2370 | 2373 | case 'localmonth': |
2371 | 2374 | return $this->mVarCache[$index] = $wgContLang->formatNum( $localMonth ); |
| 2375 | + case 'localmonth1': |
| 2376 | + return $this->mVarCache[$index] = $wgContLang->formatNum( $localMonth1 ); |
2372 | 2377 | case 'localmonthname': |
2373 | 2378 | return $this->mVarCache[$index] = $wgContLang->getMonthName( $localMonthName ); |
2374 | 2379 | case 'localmonthnamegen': |
Index: trunk/phase3/includes/MagicWord.php |
— | — | @@ -36,6 +36,7 @@ |
37 | 37 | static public $mVariableIDsInitialised = false; |
38 | 38 | static public $mVariableIDs = array( |
39 | 39 | 'currentmonth', |
| 40 | + 'currentmonth1', |
40 | 41 | 'currentmonthname', |
41 | 42 | 'currentmonthnamegen', |
42 | 43 | 'currentmonthabbrev', |
— | — | @@ -46,6 +47,7 @@ |
47 | 48 | 'currenttime', |
48 | 49 | 'currenthour', |
49 | 50 | 'localmonth', |
| 51 | + 'localmonth1', |
50 | 52 | 'localmonthname', |
51 | 53 | 'localmonthnamegen', |
52 | 54 | 'localmonthabbrev', |
— | — | @@ -106,6 +108,7 @@ |
107 | 109 | /* Array of caching hints for ParserCache */ |
108 | 110 | static public $mCacheTTLs = array ( |
109 | 111 | 'currentmonth' => 86400, |
| 112 | + 'currentmonth1' => 86400, |
110 | 113 | 'currentmonthname' => 86400, |
111 | 114 | 'currentmonthnamegen' => 86400, |
112 | 115 | 'currentmonthabbrev' => 86400, |
— | — | @@ -116,6 +119,7 @@ |
117 | 120 | 'currenttime' => 3600, |
118 | 121 | 'currenthour' => 3600, |
119 | 122 | 'localmonth' => 86400, |
| 123 | + 'localmonth1' => 86400, |
120 | 124 | 'localmonthname' => 86400, |
121 | 125 | 'localmonthnamegen' => 86400, |
122 | 126 | 'localmonthabbrev' => 86400, |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -210,7 +210,8 @@ |
211 | 211 | 'toc' => array( 0, '__TOC__' ), |
212 | 212 | 'noeditsection' => array( 0, '__NOEDITSECTION__' ), |
213 | 213 | 'noheader' => array( 0, '__NOHEADER__' ), |
214 | | - 'currentmonth' => array( 1, 'CURRENTMONTH' ), |
| 214 | + 'currentmonth' => array( 1, 'CURRENTMONTH', 'CURRENTMONTH2' ), |
| 215 | + 'currentmonth1' => array( 1, 'CURRENTMONTH1' ), |
215 | 216 | 'currentmonthname' => array( 1, 'CURRENTMONTHNAME' ), |
216 | 217 | 'currentmonthnamegen' => array( 1, 'CURRENTMONTHNAMEGEN' ), |
217 | 218 | 'currentmonthabbrev' => array( 1, 'CURRENTMONTHABBREV' ), |
— | — | @@ -220,7 +221,8 @@ |
221 | 222 | 'currentyear' => array( 1, 'CURRENTYEAR' ), |
222 | 223 | 'currenttime' => array( 1, 'CURRENTTIME' ), |
223 | 224 | 'currenthour' => array( 1, 'CURRENTHOUR' ), |
224 | | - 'localmonth' => array( 1, 'LOCALMONTH' ), |
| 225 | + 'localmonth' => array( 1, 'LOCALMONTH', 'LOCALMONTH2' ), |
| 226 | + 'localmonth1' => array( 1, 'LOCALMONTH1' ), |
225 | 227 | 'localmonthname' => array( 1, 'LOCALMONTHNAME' ), |
226 | 228 | 'localmonthnamegen' => array( 1, 'LOCALMONTHNAMEGEN' ), |
227 | 229 | 'localmonthabbrev' => array( 1, 'LOCALMONTHABBREV' ), |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -63,6 +63,8 @@ |
64 | 64 | * Database: unionQueries function to be used for UNION sql construction, so |
65 | 65 | it can be overloaded on DB abstraction level for DB specific functionality |
66 | 66 | * (bug 18849) Implement Japanese and North Korean calendars |
| 67 | +* (bug 5755) Introduce {{CURRENTMONTH1}} and {{LOCALMONTH1}} to display the |
| 68 | + month number without the leading zero |
67 | 69 | |
68 | 70 | === Bug fixes in 1.16 === |
69 | 71 | |