I18n

Provides functionality to parse and format number and dates to a specified culture or format.

Methods

formatDate

Returns a formatted date based on the specified date format options.

Parameter Type Description
value String Specifies the date that needs to be formatted.
options DateFormatOptions Specifies the format options to be used when formatted the given value.

Returns: String

formatNumber

Returns a formatted number based on the specified date format options.

Parameter Type Description
value String Specifies the number that needs to be formatted.
options NumberFormatOptions Specifies the format options to be used when formatted the given value.

Returns: String

getCultrue

Returns the current culture.

Returns: String

getDateFormat

Returns the function responsible for formatting the date value with the given format options.

Parameter Type Description
options DateFormatOptions Specifies the format options to be used within the format function.

Returns: Function

getDateParser

Returns the function responsible for parsing the date value with the given format options.

Parameter Type Description
options DateFormatOptions Specifies the format options to be used within the parsing function.

Returns: Function

getDatePattern

Returns the data time format pattern for the specified formation options.

Parameter Type Description
options DateFormatOptions Specifies the format options to be used when generating the format pattern.
excelFormat Boolean Specifies the format should return in the Excel format pattern.

Returns: String

getDaysOfWeeks

Returns a list of days in the week for the current culture using the specified options.

Parameter Type Description
options DateListFormatOptions Specifies the options on how days of weeks list will be returned.

Returns: String[]

getFirstDayOfWeek

Returns the first day of the week for the current culture.

Returns: Number

getMonths

Returns a list of months for the current culture using the specified options.

Parameter Type Description
options DateListFormatOptions Specifies the options on how months list will be returned.

Returns: String[]

getNumberFormat

Returns the function responsible for formatting the number value with the given format options.

Parameter Type Description
options NumberFormatOptions Specifies the format options to be used within the format function.

Returns: Function

getNumberParser

Returns the function responsible for parsing the number value with the given format options.

Parameter Type Description
options NumberFormatOptions Specifies the format options to be used within the parsing function.

Returns: Function

getNumberPattern

Returns the number format pattern for the specified formation options.

Parameter Type Description
options NumberFormatOptions Specifies the format options to be used when generating the format pattern.
excelFormat Boolean Specifies the format should return in the Excel format pattern.

Returns: String

parseDate

Returns a date object of the given string using the specified format options.

Parameter Type Description
value String Specifies the string value that will be converted to a date object.
options DateFormatOptions Specifies the format options to be used when converting the given value.

Returns: Date

parseNumber

Returns a number object of the given string using the specified format options.

Parameter Type Description
value String Specifies the string value that will be converted to a number object
options NumberFormatOptions Specifies the format options to be used when converting the given value.

Returns: Number