NFormat
class NFormat extends NumberFormatter
Number formatter for not following rules like Korean and Japanese.
Constants
private ORDINAL_DRIVER_PATH |
Drivers path for the ordinals. |
private CURRENCY_DRIVER_PATH |
|
Properties
static | $locale | Default locale name. |
|
static | $currency | Default ISO 4217 code aka currency code. |
Methods
Wrapper for NumberFormatter::format($locale, NumberFormatter::SPELLOUT).
Spell out ordinals for specific regions.
Wrapper for NumberFormatter::format($locale, NumberFormatter::CURRENCY).
Spell out currency ordinals for specific regions.
Wrapper for NumberFormatter::format($locale, NumberFormatter::PERCENT_SYMBOL).
Wrapper for NumberFormatter::format($locale, NumberFormatter::PERCENT_SYMBOL).
Wrapper for NumberFormatter::format($locale, NumberFormatter::DECIMAL).
Details
at line 41
static string
spellOut(int $number)
Wrapper for NumberFormatter::format($locale, NumberFormatter::SPELLOUT).
at line 58
static string
ordinalSpellOut(int $number)
Spell out ordinals for specific regions.
at line 80
static string
currency(int|float|null $number, string $zero = '0')
Wrapper for NumberFormatter::format($locale, NumberFormatter::CURRENCY).
at line 101
static string
currencySpellOut(int $number)
Spell out currency ordinals for specific regions.
at line 134
static string
percent(int $number)
Wrapper for NumberFormatter::format($locale, NumberFormatter::PERCENT_SYMBOL).
at line 150
static string
rawPercent(int $number)
Wrapper for NumberFormatter::format($locale, NumberFormatter::PERCENT_SYMBOL).
at line 167
static string
decimal(int|float|null $number, string $zero = '0')
Wrapper for NumberFormatter::format($locale, NumberFormatter::DECIMAL).