Namespace: LocaleData

Oracle® JavaScript Extension Toolkit (JET)
7.1.0

F18183-01

QuickNav


LocaleData

Version:
  • 7.1.0
Since:
  • 0.6.0
Module:
  • ojlocaledata

Module usage

See JET Module Loading for an overview of module usage within JET.

Javascript Import Format
define(['ojs/ojlocaledata'], function(LocaleData) {
 // Application should call API on LocaleData 
})
Typescript Import Format
//This namespace exports multiple static methods or members. To import 
import * as LocaleData from "ojlocaledata";

//Now you can access the methods as LocaleData.methodName and so on

JET In Typescript

A detailed description of working with JET elements and classes in your typescript project can be found at: JET Typescript Usage.

Description

Locale Data Services

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
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