Class: Convert

Convert()

Convert provides a number of type transformation functions.

Constructor

new Convert()

Source:

Members

(static) isDateString

Takes a string and checks to see if it is an ISO formatted date or a JSON-string date ISO Date: `'2012-08-28'` or `'2012-05-28T08:30:00Z'` JSON-string: `'/Date(1346189868885)/'`
Source:

(static) toBoolean

Takes a string and checks to see if it is `true` or `T`, else returns false
Source:

(static) toDateFromString

Takes a string and tests it to see if its an ISO 8601 string or a JSON-string. If a match is found it is parsed into a Date object and returned, else the original value is returned.
Source:

(static) toIsoStringFromDate

Takes a Date object and converts it to a ISO 8601 formatted string
Source:

(static) toJsonStringFromDate

Takes a Date object and returns it in JSON-string format: `'/Date(milliseconds)/'`
Source: