$bits = array();
$key = $this->keys[$this->mSource];
for ( $p=0; $p < strlen($key); $p++ ) {
- if ( $key{$p} != ' ' ) {
- $bits[$key{$p}] = $matches[$p+1];
+ if ( $key[$p] != ' ' ) {
+ $bits[$key[$p]] = $matches[$p+1];
}
}
}
for ( $p=0; $p < strlen( $format ); $p++ ) {
- $char = $format{$p};
+ $char = $format[$p];
switch ( $char ) {
case 'd': # ISO day of month
$text .= $bits['d'];
$isoBits[] = $bits['y'];
$isoBits[] = $bits['m'];
$isoBits[] = $bits['d'];
- $isoDate = implode( '-', $isoBits );;
+ $isoDate = implode( '-', $isoBits );
// Output is not strictly HTML (it's wikitext), but <span> is whitelisted.
$text = Html::rawElement( 'span',
* @todo document
*/
function makeNormalYear( $iso ) {
- if ( $iso{0} == '-' ) {
+ if ( $iso[0] == '-' ) {
$text = (intval( substr( $iso, 1 ) ) + 1) . ' BC';
} else {
$text = intval( $iso );