Class Index | File Index

Classes


Built-In Namespace _global_

Field Summary
Field Attributes Field Name and Description
 
 
Method Summary
Method Attributes Method Name and Description
<static>  
CalendarFactory(options)
Factory method to create a new instance of a calendar subclass.
<static>  
DateFactory(options)
Factory method to create a new instance of a date subclass.
<static>  
isAlnum(ch)
Return whether or not the first character is alphabetic or numeric.
<static>  
isAlpha(ch)
Return whether or not the first character is alphabetic.
<static>  
isAscii(ch)
Return whether or not the first character is in the ASCII range.
<static>  
isBlank(ch)
Return whether or not the first character is a blank character.
<static>  
isCntrl(ch)
Return whether or not the first character is a control character.
<static>  
isDigit(ch)
Return whether or not the first character is a digit character in the Latin script.
<static>  
isGraph(ch)
Return whether or not the first character is any printable character other than space.
<static>  
isIdeo(ch)
Return whether or not the first character is an ideographic character.
<static>  
isLower(ch)
Return whether or not the first character is lower-case.
<static>  
isPrint(ch)
Return whether or not the first character is any printable character, including space.
<static>  
isPunct(ch)
Return whether or not the first character is punctuation.
<static>  
isScript(ch, script)
Return whether or not the first character in the given string is in the given script.
<static>  
isSpace(ch)
Return whether or not the first character is a whitespace character.
<static>  
isUpper(ch)
Return whether or not the first character is upper-case.
<static>  
Return whether or not the first character is a hexadecimal digit written in the Latin script.
<static>  
Create a measurement subclass instance based on a particular measure required.
<static>  
PhoneHandlerFactory(locale, plan)
Creates a phone handler instance that is correct for the locale.
Field Detail
field

Defined in: ilib-full-dyn.js.

sync

Defined in: ilib-full-dyn.js.
Method Detail
<static> {Calendar} CalendarFactory(options)
Factory method to create a new instance of a calendar subclass.

The options parameter can be an object that contains the following properties:

If a locale is specified, but no type, then the calendar that is default for the locale will be instantiated and returned. If neither the type nor the locale are specified, then the calendar for the default locale will be used.
Defined in: ilib-full-dyn.js.
Parameters:
{Object=} options
options controlling the construction of this instance, or undefined to use the default options
Returns:
{Calendar} an instance of a calendar object of the appropriate type

<static> {IDate} DateFactory(options)
Factory method to create a new instance of a date subclass.

The options parameter can be an object that contains the following properties:

The options object is also passed down to the date constructor, and thus can contain the the properties as the date object being instantiated. See the documentation for GregorianDate, and other subclasses for more details on other parameter that may be passed in.

Please note that if you do not give the type parameter, this factory method will create a date object that is appropriate for the calendar that is most commonly used in the specified or current ilib locale. For example, in Thailand, the most common calendar is the Thai solar calendar. If the current locale is "th-TH" (Thai for Thailand) and you use this factory method to construct a new date without specifying the type, it will automatically give you back an instance of ThaiSolarDate. This is convenient because you do not need to know which locales use which types of dates. In fact, you should always use this factory method to make new date instances unless you know that you specifically need a date in a particular calendar.

Also note that when you pass in the date components such as year, month, day, etc., these components should be appropriate for the given date being instantiated. That is, in our Thai example in the previous paragraph, the year and such should be given as a Thai solar year, not the Gregorian year that you get from the Javascript Date class. In order to initialize a date instance when you don't know what subclass will be instantiated for the locale, use a parameter such as "unixtime" or "julianday" which are unambiguous and based on UTC time, instead of the year/month/date date components. The date components for that UTC time will be calculated and the time zone offset will be automatically factored in.
Defined in: ilib-full-dyn.js.

Parameters:
{Object=} options
options controlling the construction of this instance, or undefined to use the default options
Returns:
{IDate} an instance of a calendar object of the appropriate type

<static> {boolean} isAlnum(ch)
Return whether or not the first character is alphabetic or numeric.


Defined in: ilib-full-dyn.js.

Parameters:
{string|IString|number} ch
character or code point to examine
Returns:
{boolean} true if the first character is alphabetic or numeric

<static> {boolean} isAlpha(ch)
Return whether or not the first character is alphabetic.


Defined in: ilib-full-dyn.js.

Parameters:
{string|IString|number} ch
character or code point to examine
Returns:
{boolean} true if the first character is alphabetic.

<static> {boolean} isAscii(ch)
Return whether or not the first character is in the ASCII range.


Defined in: ilib-full-dyn.js.

Parameters:
{string|IString|number} ch
character or code point to examine
Returns:
{boolean} true if the first character is in the ASCII range.

<static> {boolean} isBlank(ch)
Return whether or not the first character is a blank character.


Defined in: ilib-full-dyn.js.

Parameters:
{string|IString|number} ch
character or code point to examine
Returns:
{boolean} true if the first character is a blank character.

<static> {boolean} isCntrl(ch)
Return whether or not the first character is a control character.


Defined in: ilib-full-dyn.js.

Parameters:
{string|IString|number} ch
character or code point to examine
Returns:
{boolean} true if the first character is a control character.

<static> {boolean} isDigit(ch)
Return whether or not the first character is a digit character in the Latin script.


Defined in: ilib-full-dyn.js.

Parameters:
{string|IString|number} ch
character or code point to examine
Returns:
{boolean} true if the first character is a digit character in the Latin script.

<static> {boolean} isGraph(ch)
Return whether or not the first character is any printable character other than space.


Defined in: ilib-full-dyn.js.

Parameters:
{string|IString|number} ch
character or code point to examine
Returns:
{boolean} true if the first character is any printable character other than space.

<static> {boolean} isIdeo(ch)
Return whether or not the first character is an ideographic character.


Defined in: ilib-full-dyn.js.

Parameters:
{string|IString|number} ch
character or code point to examine
Returns:
{boolean} true if the first character is an ideographic character.

<static> {boolean} isLower(ch)
Return whether or not the first character is lower-case. For alphabetic characters in scripts that do not make a distinction between upper- and lower-case, this function always returns true.


Defined in: ilib-full-dyn.js.

Parameters:
{string|IString|number} ch
character or code point to examine
Returns:
{boolean} true if the first character is lower-case.

<static> {boolean} isPrint(ch)
Return whether or not the first character is any printable character, including space.


Defined in: ilib-full-dyn.js.

Parameters:
{string|IString|number} ch
character or code point to examine
Returns:
{boolean} true if the first character is printable.

<static> {boolean} isPunct(ch)
Return whether or not the first character is punctuation.


Defined in: ilib-full-dyn.js.

Parameters:
{string|IString|number} ch
character or code point to examine
Returns:
{boolean} true if the first character is punctuation.

<static> {boolean} isScript(ch, script)
Return whether or not the first character in the given string is in the given script. The script is given as the 4-letter ISO 15924 script code.


Defined in: ilib-full-dyn.js.

Parameters:
{string|IString|number} ch
character or code point to examine
{string} script
the 4-letter ISO 15924 to query against
Returns:
{boolean} true if the first character is in the given script, and false otherwise

<static> {boolean} isSpace(ch)
Return whether or not the first character is a whitespace character.


Defined in: ilib-full-dyn.js.

Parameters:
{string|IString|number} ch
character or code point to examine
Returns:
{boolean} true if the first character is a whitespace character.

<static> {boolean} isUpper(ch)
Return whether or not the first character is upper-case. For alphabetic characters in scripts that do not make a distinction between upper- and lower-case, this function always returns true.


Defined in: ilib-full-dyn.js.

Parameters:
{string|IString|number} ch
character or code point to examine
Returns:
{boolean} true if the first character is upper-case.

<static> {boolean} isXdigit(ch)
Return whether or not the first character is a hexadecimal digit written in the Latin script. (0-9 or A-F)


Defined in: ilib-full-dyn.js.

Parameters:
{string|IString|number} ch
character or code point to examine
Returns:
{boolean} true if the first character is a hexadecimal digit written in the Latin script.

<static> MeasurementFactory(options)
Create a measurement subclass instance based on a particular measure required. The measurement is immutable once it is created, but it can be converted to other measurements later.

The options may contain any of the following properties:

Here are some examples of converting a length into new units. The first method is via this factory function by passing the old measurement in as the "amount" property.

var measurement1 = MeasurementFactory({
  amount: 5,
  units: "kilometers"
});
var measurement2 = MeasurementFactory({
  amount: measurement1,
  units: "miles"
});
The value in measurement2 will end up being about 3.125 miles.

The second method uses the convert method.

var measurement1 = MeasurementFactory({
  amount: 5,
  units: "kilometers"
});
var measurement2 = measurement1.convert("miles");
});
The value in measurement2 will again end up being about 3.125 miles.
Defined in: ilib-full-dyn.js.
Parameters:
{Object=} options
options that control the construction of this instance

<static> {PhoneHandler} PhoneHandlerFactory(locale, plan)
Creates a phone handler instance that is correct for the locale. Phone handlers are used to handle parsing of the various fields in a phone number.
Defined in: ilib-full-dyn.js.
Parameters:
locale
plan
Returns:
{PhoneHandler} the correct phone handler for the locale

Documentation generated by JsDoc Toolkit 2.4.0 on Tue Feb 02 2016 15:53:54 GMT-0800 (PST)