Usage
Typescript Import Format
//This namespace exports multiple static methods or members. To import
import * as LocaleData from "ojs/ojlocaledata";
//Now you can access the methods as LocaleData.methodName and so on
For additional information visit:
Methods
-
(static) getDayNames(type) : {Array.<string>}
-
Retrieves locale-specific names of the days of the week
Parameters:
Name Type Argument Description type
'abbreviated' | 'narrow' | 'wide' <optional>
the type of the name. Currently, "abbreviated", "narrow" and "wide" are supported Returns:
names of the days from Sunday through Sturday
- Type
- Array.<string>
-
(static) getFirstDayOfWeek : {number}
-
Retrieves the first day of week for the current locale's region
Returns:
a numeric representation of the first week day of the week: 0 for Sunday, 1 for Monday, etc.
- Type
- number
-
(static) getMonthNames(type) : {Array.<string>}
-
Retrieves locale-specific names of months
Parameters:
Name Type Argument Description type
'abbreviated' | 'narrow' | 'wide' <optional>
the type of the name. Currently, "abbreviated", "narrow" and "wide" are supported Returns:
names of months from January through December
- Type
- Array.<string>
-
(static) getWeekendEnd : {number}
-
Retrieves the last weekend day for the current locale's region
Returns:
a numeric representation of the last weekend day: 0 for Sunday, 1 for Monday, etc.
- Type
- number
-
(static) getWeekendStart : {number}
-
Retrieves the first weekend day for the current locale's region
Returns:
a numeric representation of the first weekend day: 0 for Sunday, 1 for Monday, etc.
- Type
- number
-
(static) isMonthPriorToYear : {boolean}
-
Retrieves whether month is displayed prior to year
- Deprecated:
-
Since Description 11.0.0
This is used internally by the oj-date-picker component, and should not be called by application code. If the functionality is needed, use Intl.DateTimeFormat.formatToParts instead which returns the formatted pieces in order.
Returns:
whether month is prior to year
- Type
- boolean
-
(static) setBundle(bundle) : {void}
-
Sets the Locale Elements bundle used by JET If an AMD loader (such as Require.js) is not present, this method should be called by the application to provide a Locale Elements for JET. This method may also be used by an application that wants to completely replace the Locale Elements bundle that is automatically fetched by an AMD loader.
Parameters:
Name Type Description bundle
Object resource bundle that should be used by the framework Returns:
- Type
- void