New to Kendo UI for Angular? Start a free 30-day trial
The Internationalization service implemented by using
the CLDR Database via the @progress/kendo-intl
package.
Name | Type | Default | Description |
---|
|
string
|
|
(localeId: string)
Creates a new instance of the service with the ID of the specified locale.
Note that the parts of the locale ID can be separated by either _
(underscore)
or -
(dash).
string
The default locale ID.
|
---|
Returns the date names from the current locale based on the option.
The available type values are:
era
year
quarter
month
week
day
dayperiod
hour
minute
second
zone
The available nameType values are:
dateFieldName({ type: 'day' });
dateFieldName({ type: 'day', nameType: 'wide' });
dateFieldName({ type: 'month', nameType: 'short' });
dateFieldName({ type: 'month', nameType: 'wide' });
|
Parameters | | |
---|
options
|
DateFieldNameOptions
|
Detailed configuration for the desired date field name.
|
localeId?
|
string
|
The locale ID to use in place of the default one. Optional.
|
|
Returns | |
---|
string
|
- The day names from the current locale based on the option.
|
|
|
---|
Returns a localized date field name based on specific dateFieldName options.
The available type values are:
day
dayperiod
months
quarters
eras
|
Parameters | | |
---|
options
|
DateFormatNameOptions
|
Detailed configuration for the desired date format.
|
localeId?
|
string
|
The locale ID to use in place of the default one. Optional.
|
|
Returns | |
---|
any
|
- The day names from the current locale based on the option.
|
|
|
---|
Returns the first day index starting from Sunday.
|
Parameters | | |
---|
localeId?
|
string
|
The locale ID. Defaults to the current locale ID.
|
|
Returns | |
---|
number
|
- The index of the first day of the week (0 == Sunday).
|
|
|
---|
Formats a string with placeholders such as
Total amount {0:c} .
|
Parameters | | |
---|
format
|
string
|
The format string.
|
values
|
any[]
|
One or more values to output in the format string placeholders.
|
|
|
|
---|
Converts a Date object into a string based on the specified format.
If no format is provided, the default short date format is used.
|
Parameters | | |
---|
value
|
Date
|
The date to format.
|
format?
|
string | DateFormatOptions
|
The format string or options.
|
localeId?
|
string
|
The locale ID to use in place of the default one. Optional.
|
|
Returns | |
---|
string
|
The formatted date.
|
|
|
---|
Converts a Number into a string based on the specified format.
|
Parameters | | |
---|
value
|
number
|
The number to format.
|
format
|
string | NumberFormatOptions
|
The format string or options.
|
localeId?
|
string
|
The locale ID to use in place of the default one. Optional.
|
|
Returns | |
---|
string
|
The formatted number.
|
|
|
---|
Notifies that the service was changed.
|
|
---|
Returns the number symbols from the current locale based on the option.
|
Parameters | | |
---|
localeId?
|
string
|
The locale ID to use in place of the default one. Optional.
|
|
Returns | |
---|
any
|
- The number symbols from the current locale.
|
|
|
---|
Converts a string into a Date object based on the specified format.
|
Parameters | | |
---|
value
|
string
|
The string to convert.
|
format?
|
string | string[] | DateFormatOptions | DateFormatOptions[]
|
The format strings or options.
|
localeId?
|
string
|
The locale ID to use in place of the default one. Optional.
|
|
Returns | |
---|
Date
|
The parsed date.
|
|
|
---|
Converts a string into a Number .
|
Parameters | | |
---|
value
|
string
|
The string to convert.
|
format?
|
string | NumberFormatOptions
|
The format string or options.
|
localeId?
|
string
|
The locale ID to use in place of the default one. Optional.
|
|
Returns | |
---|
number
|
The parsed number.
|
|
|
---|
Splits the date format into objects containing information about each part of the pattern.
|
Parameters | | |
---|
format
|
string | DateFormatOptions
|
The format string or options.
|
localeId?
|
string
|
The optional locale id. If not specified, the "en" locale id is used.
|
|
|
|
---|
Converts an object into a string based on the specified format.
|
Parameters | | |
---|
value
|
any
|
The value to format.
|
format
|
any
|
The format to use.
|
localeId?
|
string
|
The locale ID to use in place of the default one. Optional.
|
|
Returns | |
---|
string
|
The formatted object.
|
|
|
---|
Returns the start and end index of the locale weekend starting from Sunday.
|
Parameters | | |
---|
localeId?
|
string
|
The locale ID. Defaults to the current locale ID.
|
|
Returns | |
---|
DayRange
|
- The start and end index of the locale weekend (0 == Sunday).
|
|