Namespace: IntlConverterUtils

Oracle® JavaScript Extension Toolkit (JET)
7.1.0

F18183-01

QuickNav


IntlConverterUtils

Version:
  • 7.1.0
Since:
  • 0.7
Module:
  • ojvalidation-base

Module usage

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

Javascript Import Format
define(['ojs/ojvalidation-base'], function(validationBase) {
 // Application should call API on validationBase.IntlConverterUtils 
})

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

Utility function for converters

Methods

(static) dateToLocalIso(date) → {string}

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

(static) getConverterInstance<T>(converterOption: string|Validation.RegisteredConverter|Converter<T>): oj.Converter<T>|null

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. You can also pass in a string. In this case, it will return you an instance of a converter registered with that type.
Parameters:
Name Type Description
converterOption string | Object
Since:
  • 0.6
Returns:
converterInstance or null if a converter cannot be determined
Type
Object | null

(static) getInitials(firstName, lastName) → {string|undefined}

Returns a person's initials
Parameters:
Name Type Argument Description
firstName string <optional>
first name
lastName string <optional>
last name
Since:
  • 4.0.0
Returns:
uppercase concatenation of first letter of first name and first letter of last name. There are the following special cases: - If the name is Arabic characters, it returns empty string. - If the name is Hindi characters, it returns the first letter of the first name. - If the name is Thai characters, it returns the first letter of the first name. - If the name is Korean characters, it returns the first name. - If the name is Japanese or Chinese characters, it returns the last name.
Type
string | undefined

(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)
Returns:
Type
string

(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
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
Returns:
localDate
Type
Date