Properties
currentLocale
currentLocale: string
Methods
compare
compare( x: string , y: string , options: CollatorOptions ) : number
Parameters
x: string
y: string
options: CollatorOptions
Returns number
formatDate
formatDate( value: Date | number | string , options: DateTimeFormatOptions ) : string
Parameters
value: Date | number | string
options: DateTimeFormatOptions
Returns string
formatDateRange
formatDateRange( start: Date | number | string , end: Date | number | string , options?: Intl.DateTimeFormatOptions ) : string
Parameters
start: Date | number | string
end: Date | number | string
Optional options: Intl.DateTimeFormatOptions
Returns string
formatNumber
formatNumber( value: number , options: NumberFormatOptions ) : string
Parameters
value: number
options: NumberFormatOptions
Returns string
formatTimeRange
formatTimeRange( start: Date | number | string , end: Date | number | string , options?: Intl.DateTimeFormatOptions ) : string
Parameters
start: Date | number | string
end: Date | number | string
Optional options: Intl.DateTimeFormatOptions
Returns string
parseDate
parseDate( date: string , defaultValue?: Date ) : Date
Parameters
date: string
Optional defaultValue: Date
Returns Date
Legend
Module
Object literal
Variable
Function
Function with type parameter
Index signature
Type alias
Type alias with type parameter
Enumeration
Enumeration member
Property
Method
Interface
Interface with type parameter
Constructor
Property
Method
Index signature
Class
Class with type parameter
Constructor
Property
Method
Accessor
Index signature
Inherited constructor
Inherited property
Inherited method
Inherited accessor
Protected property
Protected method
Protected accessor
Private property
Private method
Private accessor
Static property
Static method
A thin wrapper around the IntlAdapter to avoid the need to pass a locale id to every method. Ensure to instantiate this as an app-wide singleton to use the same locale id everywhere