Index: trunk/phase3/includes/parser/Parser.php
===================================================================
--- trunk/phase3/includes/parser/Parser.php (revision 50810)
+++ trunk/phase3/includes/parser/Parser.php (revision 50811)
@@ -2341,6 +2341,7 @@
wfSuppressWarnings(); // E_STRICT system time bitching
$localTimestamp = date( 'YmdHis', $ts );
$localMonth = date( 'm', $ts );
+ $localMonth1 = date( 'n', $ts );
$localMonthName = date( 'n', $ts );
$localDay = date( 'j', $ts );
$localDay2 = date( 'd', $ts );
@@ -2356,6 +2357,8 @@
switch ( $index ) {
case 'currentmonth':
return $this->mVarCache[$index] = $wgContLang->formatNum( gmdate( 'm', $ts ) );
+ case 'currentmonth1':
+ return $this->mVarCache[$index] = $wgContLang->formatNum( gmdate( 'n', $ts ) );
case 'currentmonthname':
return $this->mVarCache[$index] = $wgContLang->getMonthName( gmdate( 'n', $ts ) );
case 'currentmonthnamegen':
@@ -2368,6 +2371,8 @@
return $this->mVarCache[$index] = $wgContLang->formatNum( gmdate( 'd', $ts ) );
case 'localmonth':
return $this->mVarCache[$index] = $wgContLang->formatNum( $localMonth );
+ case 'localmonth1':
+ return $this->mVarCache[$index] = $wgContLang->formatNum( $localMonth1 );
case 'localmonthname':
return $this->mVarCache[$index] = $wgContLang->getMonthName( $localMonthName );
case 'localmonthnamegen':
Index: trunk/phase3/includes/MagicWord.php
===================================================================
--- trunk/phase3/includes/MagicWord.php (revision 50810)
+++ trunk/phase3/includes/MagicWord.php (revision 50811)
@@ -36,6 +36,7 @@
static public $mVariableIDsInitialised = false;
static public $mVariableIDs = array(
'currentmonth',
+ 'currentmonth1',
'currentmonthname',
'currentmonthnamegen',
'currentmonthabbrev',
@@ -46,6 +47,7 @@
'currenttime',
'currenthour',
'localmonth',
+ 'localmonth1',
'localmonthname',
'localmonthnamegen',
'localmonthabbrev',
@@ -106,6 +108,7 @@
/* Array of caching hints for ParserCache */
static public $mCacheTTLs = array (
'currentmonth' => 86400,
+ 'currentmonth1' => 86400,
'currentmonthname' => 86400,
'currentmonthnamegen' => 86400,
'currentmonthabbrev' => 86400,
@@ -116,6 +119,7 @@
'currenttime' => 3600,
'currenthour' => 3600,
'localmonth' => 86400,
+ 'localmonth1' => 86400,
'localmonthname' => 86400,
'localmonthnamegen' => 86400,
'localmonthabbrev' => 86400,
Index: trunk/phase3/languages/messages/MessagesEn.php
===================================================================
--- trunk/phase3/languages/messages/MessagesEn.php (revision 50810)
+++ trunk/phase3/languages/messages/MessagesEn.php (revision 50811)
@@ -210,7 +210,8 @@
'toc' => array( 0, '__TOC__' ),
'noeditsection' => array( 0, '__NOEDITSECTION__' ),
'noheader' => array( 0, '__NOHEADER__' ),
- 'currentmonth' => array( 1, 'CURRENTMONTH' ),
+ 'currentmonth' => array( 1, 'CURRENTMONTH', 'CURRENTMONTH2' ),
+ 'currentmonth1' => array( 1, 'CURRENTMONTH1' ),
'currentmonthname' => array( 1, 'CURRENTMONTHNAME' ),
'currentmonthnamegen' => array( 1, 'CURRENTMONTHNAMEGEN' ),
'currentmonthabbrev' => array( 1, 'CURRENTMONTHABBREV' ),
@@ -220,7 +221,8 @@
'currentyear' => array( 1, 'CURRENTYEAR' ),
'currenttime' => array( 1, 'CURRENTTIME' ),
'currenthour' => array( 1, 'CURRENTHOUR' ),
- 'localmonth' => array( 1, 'LOCALMONTH' ),
+ 'localmonth' => array( 1, 'LOCALMONTH', 'LOCALMONTH2' ),
+ 'localmonth1' => array( 1, 'LOCALMONTH1' ),
'localmonthname' => array( 1, 'LOCALMONTHNAME' ),
'localmonthnamegen' => array( 1, 'LOCALMONTHNAMEGEN' ),
'localmonthabbrev' => array( 1, 'LOCALMONTHABBREV' ),
Index: trunk/phase3/RELEASE-NOTES
===================================================================
--- trunk/phase3/RELEASE-NOTES (revision 50810)
+++ trunk/phase3/RELEASE-NOTES (revision 50811)
@@ -63,6 +63,8 @@
* Database: unionQueries function to be used for UNION sql construction, so
it can be overloaded on DB abstraction level for DB specific functionality
* (bug 18849) Implement Japanese and North Korean calendars
+* (bug 5755) Introduce {{CURRENTMONTH1}} and {{LOCALMONTH1}} to display the
+ month number without the leading zero
=== Bug fixes in 1.16 ===