Class NumberFormatter
-
ICanBoogie\CLDR\NumberFormatter
implements
ICanBoogie\CLDR\Formatter
uses
ICanBoogie\Accessor\AccessorTrait (not available)
ICanBoogie\CLDR\RepositoryPropertyTrait,
ICanBoogie\CLDR\LocalizeTrait
Methods summary
public static
precision_from( number $number
)
: integer
Returns the precision of a number.
Returns the precision of a number.
Deprecated
Parameters
Returns
integer
See
Number::precision_from()
public static
round_to( number $number
, integer $precision
)
: float
Returns a number rounded to the specified precision.
Returns a number rounded to the specified precision.
Deprecated
Parameters
Returns
float
See
Number::round_to()
public static
parse_number( number $number
, null|integer $precision
= null )
: array
Parses a number.
Deprecated
Parameters
Returns
array
See
Number::parse()
public
__invoke( mixed $number
, string $pattern
, array $symbols
= [] )
: string
Format a number with the specified pattern.
Format a number with the specified pattern.
Note, if the pattern contains '%', the number will be multiplied by 100 first. If the
pattern contains '‰', the number will be multiplied by 1000.
Parameters
$number
- The number to be formatted.
$pattern
- The pattern used to format the number.
$symbols
- Symbols.
Returns
string
The formatted number.
get_repository()
localize()
Magic methods summary
Properties summary
$repository