Class: IntlConverterUtils

Oracle® JavaScript Extension Toolkit (JET)
3.2.0

E87541-01

QuickNav

oj. IntlConverterUtils

Version:
  • 3.2.0
Since:
  • 0.7
Utility function for converters

Constructor

new IntlConverterUtils()

Source:

Methods

<static> dateToLocalIso(date) → {string}

Returns a local isoString provided a Date object
Parameters:
Name Type Description
date Date
Since:
  • 0.7
Source:
Returns:
isoString
Type
string

<static> getConverterInstance(converterOption) → {Object}

Given either an Object literal representing a 'converter' option (used in components) or a converter instance of type oj.Converter, this method returns the converter instance.
Parameters:
Name Type Description
converterOption Object
Since:
  • 0.6
Source:
Returns:
converterInstance or null if a converter cannot be determined
Type
Object

<static> getLocalTimeZoneOffset() → {string}

Returns the timezone offset between UTC and the local time in Etc/GMT[+-]hh:mm syntax. The offset is positive if the local timezone is behind UTC and negative if it is ahead. The offset range is between Etc/GMT-14 and Etc/GMT+12 (UTC-12 and UTC+14)
Source:
Returns:
Type
string
Examples

The local time is UTC-7 (Pacific Daylight Time)

oj.IntlConverterUtils.getLocalTimeZoneOffset() will return the string "Etc/GMT+07:00" 

The local time is UTC+1 (Central European Standard Time)

oj.IntlConverterUtils.getLocalTimeZoneOffset() will return the string "Etc/GMT-01:00" 

<static> isoToDate(isoString) → {Date}

Parses the isoString and returns a JavaScript Date object
Parameters:
Name Type Description
isoString string isoString to parse and to return Date of
Source:
Returns:
the parsed JavaScript Date Object
Type
Date

<static> isoToLocalDate(isoString) → {Date}

Returns a local Date object provided a local isoString
Parameters:
Name Type Description
isoString string date in isoString format
Since:
  • 0.7
Source:
Returns:
localDate
Type
Date