DP_DateExtension:
ISO 8601 Parsing/Formatting Examples

Back to the Main Page

All of these examples assume that the library has been imported as noted in the Documentation.

Parsing ISO 8601 Dates

To parse ISO 8601 dates invoke the parseIso8601() method directly from the date object. The following examples represent parsable versions of ISO 8601 dates:

Generating ISO 8601 Date/Times

Several examples of ISO 8601 formatting follow (these assume that "CurDate" is a valid JavaScript Date):