phstc/jquery-dateFormat — Issue #18: Zulu w/o colon
Author: fuzzygroove
Created: 2011-11-19 01:58:12+00:00
State: open

To support formats that don't incude the final colon in the time zone offset, you need to change the regex:

$.format.date("2011-09-22T05:02:55.889+0000", "dd/mm/yyyy hh:mm:ss")
// fails because "+0000" doesn't include a colon, but this is a valid alternate format for ISO 8601

"The following times all refer to the same moment: "18:30Z", "22:30+04", "1130-0700", and "15:00-03:30" (http://en.wikipedia.org/wiki/ISO_8601#Time_zone_designators)

It's a single character fix:

line 93:
} else if (value.search(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.?\d{0,3}[-+]?\d{2}:\d{2}/) != -1) { /* 2009-04-19T16:11:05+02:00 */
should be:
} else if (value.search(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.?\d{0,3}[-+]?\d{2}:?\d{2}/) != -1) { /* 2009-04-19T16:11:05+02:00 */

(there's a question mark after the final colon to match zero or one colon).