Commit 4dbf1fe7 by Erik_r

Typo in function call #2359

parent cf960e89
...@@ -1384,7 +1384,7 @@ class Formatter extends yii\base\Component ...@@ -1384,7 +1384,7 @@ class Formatter extends yii\base\Component
*/ */
public function asNumber($value, $decimals = 0, $roundIncr = null, $grouping = true) public function asNumber($value, $decimals = 0, $roundIncr = null, $grouping = true)
{ {
return asDouble($value, $decimals, $roundIncr, $grouping); return $this->asDouble($value, $decimals, $roundIncr, $grouping);
} }
public function ufNumber($value){ public function ufNumber($value){
return $this->ufDouble($value); return $this->ufDouble($value);
...@@ -1400,7 +1400,7 @@ class Formatter extends yii\base\Component ...@@ -1400,7 +1400,7 @@ class Formatter extends yii\base\Component
*/ */
public function asDecimal($value, $decimals = 2, $roundIncr = null, $grouping = true) public function asDecimal($value, $decimals = 2, $roundIncr = null, $grouping = true)
{ {
return asDouble($value, $decimals, $roundIncr, $grouping); return $this->asDouble($value, $decimals, $roundIncr, $grouping);
} }
public function ufDecimal($value){ public function ufDecimal($value){
return $this->ufDouble($value); return $this->ufDouble($value);
...@@ -1432,7 +1432,6 @@ class Formatter extends yii\base\Component ...@@ -1432,7 +1432,6 @@ class Formatter extends yii\base\Component
// if (true === false){ // if (true === false){
if ($this->_intlLoaded){ if ($this->_intlLoaded){
$f = $this->createNumberFormatter(NumberFormatter::PERCENT, $format); $f = $this->createNumberFormatter(NumberFormatter::PERCENT, $format);
// $f->setAttribute(NumberFormatter::ROUNDING_MODE, NumberFormatter::ROUND_HALFUP);
$f->setAttribute(NumberFormatter::MAX_FRACTION_DIGITS, $decimals); $f->setAttribute(NumberFormatter::MAX_FRACTION_DIGITS, $decimals);
if ($decimals <= 5){ if ($decimals <= 5){
$f->setAttribute(NumberFormatter::MIN_FRACTION_DIGITS, $decimals); $f->setAttribute(NumberFormatter::MIN_FRACTION_DIGITS, $decimals);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment