public static function percentage( $value, $decimals = 0 )
	{
		$nf = new \NumberFormatter(\Locale::getDefault(), \NumberFormatter::PERCENT);
		$nf->setAttribute(\NumberFormatter::MAX_FRACTION_DIGITS, $decimals);
		return $value > 1 ? $nf->format($value) : $nf->format($value);
	}
public static function percentage( $value, $decimals = 0 )
	{
		$nf = new \NumberFormatter(\Locale::getDefault(), \NumberFormatter::PERCENT);
		$nf->setAttribute(\NumberFormatter::MAX_FRACTION_DIGITS, $decimals);
		return $value > 1 ? $nf->format($value) : $nf->format($value);
	}
public static function percentage ( $ value , $ decimals = 0 ) { $ nf = new \ NumberFormatter ( \ Locale :: getDefault ( ) , \ NumberFormatter :: PERCENT ) ; $ nf -> setAttribute ( \ NumberFormatter :: MAX_FRACTION_DIGITS , $ decimals ) ; return $ value > 1 ? $ nf -> format ( $ value ) : $ nf -> format ( $ value ) ; }
returns a string with percentage formatted accordingly to Yii dateFormatter
@param $value
@param $decimals
@return string
returns a string with percentage formatted accordingly to Yii dateFormatter