Options
All
  • Public
  • Public/Protected
  • All
Menu

Provides culture-specific formatting for numeric values by using the Intl namespace.

Requires the clr-format-intl.js sub-module to be loaded.

Hierarchy

Implements

Index

Constructors

constructor

Properties

Protected decorationFormatter

decorationFormatter: DecorationFormatter<NumberFormatOptions>

Protected formatInfo

formatInfo: NumberFormatInfo

Private locales

locales: string | string[]

Protected resolvedOptions

resolvedOptions: NumberFormatOptions

Methods

Private applyCultureSpecificFormatting

  • applyCultureSpecificFormatting(invariantlyFormattedString: string): string

Protected applyOptions

  • applyOptions(value: number): string

format

  • format(format: string, value: number): string
  • Converts the number to an equivalent string representation using specified format and culture formatting information.

    Parameters

    • format: string

      A format string containing formatting specifications.

    • value: number

      The number to format.

    Returns string

    The formatted numeric value.

Private getNativeFormatter

  • getNativeFormatter(resolvedOptions: NumberFormatOptions): NumberFormat

Private overrideCurrencyOptions

  • overrideCurrencyOptions(): void

Private overrideDecimalOptions

  • overrideDecimalOptions(): void

Private overrideFractionDigits

  • overrideFractionDigits(overrideValue: number): void

Private overrideOptions

  • overrideOptions(overrideStyle: boolean | string): void

Private replaceInvariantSymbols

  • replaceInvariantSymbols(replaceChar: string): string

Object literals

Static Private supportedStyles

supportedStyles: object

Possible values are:

  • "decimal" for plain number formatting (acts as override for "fixed-point", "number" or "undefined");
  • "currency" for currency formatting;
  • "percent" for percent formatting;

currency

currency: boolean

decimal

decimal: boolean

exponential

exponential: boolean

fixedPoint

fixedPoint: string

general

general: boolean

hex

hex: boolean

number

number: string

percent

percent: boolean

roundTrip

roundTrip: boolean

undefined

undefined: string

Generated using TypeDoc