Index: trunk/extensions/ParserFunctions/SprintfDateCompat.php |
— | — | @@ -87,6 +87,16 @@ |
88 | 88 | if ( !$unix ) $unix = wfTimestamp( TS_UNIX, $ts ); |
89 | 89 | $num = date( 'L', $unix ); |
90 | 90 | break; |
| 91 | + # 'o' is supported since PHP 5.1.0 |
| 92 | + # return literal if not supported |
| 93 | + # TODO: emulation for pre 5.1.0 versions |
| 94 | + case 'o': |
| 95 | + if ( !$unix ) $unix = wfTimestamp( TS_UNIX, $ts ); |
| 96 | + if ( version_compare(PHP_VERSION, '5.1.0') === 1 ) |
| 97 | + $num = date( 'o', $unix ); |
| 98 | + else |
| 99 | + $s .= 'o'; |
| 100 | + break; |
91 | 101 | case 'Y': |
92 | 102 | $num = substr( $ts, 0, 4 ); |
93 | 103 | break; |