mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-04 22:57:40 +08:00
no need for as number #2524
This commit is contained in:
@ -412,7 +412,6 @@ class Formatter extends Component
|
|||||||
* @return string the formatted result
|
* @return string the formatted result
|
||||||
* @see decimalSeparator
|
* @see decimalSeparator
|
||||||
* @see thousandSeparator
|
* @see thousandSeparator
|
||||||
* @see asNumber
|
|
||||||
*/
|
*/
|
||||||
public function asSize($value, $decimals = 0)
|
public function asSize($value, $decimals = 0)
|
||||||
{
|
{
|
||||||
@ -428,6 +427,6 @@ class Formatter extends Component
|
|||||||
$position++;
|
$position++;
|
||||||
} while ($position < count($units));
|
} while ($position < count($units));
|
||||||
|
|
||||||
return $this->asNumber($value, $decimals) . Yii::t('yii', end($units));
|
return number_format($value, $decimals) . Yii::t('yii', end($units));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user