Namespace: Date

SuperMap.Date

Contains implementations of Date.parse and date.toISOString that match the ECMAScript 5 specification for parsing RFC 3339 dates.

Members

SuperMap.Date.toISOString

Generates a string representing a date, which follows the ISO 8601 criterion(see http://tools.ietf.org/html/rfc3339).

Example
var dateString = SuperMap.Date.toISOString(new Date());

Methods

SuperMap.Date.parse(str){Date}

Date.js, line 63

Generate a date object from a string.

Name Type Description
str string

A string representing a date. (For example: "2010", "2010-08", "2010-08-07", "2010-08-07T16:58:23.123Z","2010-08-07T11:58:23.123-06").

Returns:
Type Description
Date The date object. Returns an invalid date if the string cannot be parsed. (For example, isNaN(date.getTime())).
Example
var date = SuperMap.Date.parse("2010-08-07");