From 92bfb38caf5858884f8808b44f6a6bdd6a912223 Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Sun, 10 Jun 2012 09:21:07 +0000 Subject: [PATCH] in Ox.parseDate, only remove first element of values array if there was a match --- source/Ox/js/Date.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/Ox/js/Date.js b/source/Ox/js/Date.js index 7bcc0402..a05f53d5 100644 --- a/source/Ox/js/Date.js +++ b/source/Ox/js/Date.js @@ -279,8 +279,9 @@ Ox.parseDate = function(string, utc) { var date, defaults = [, 1, 1, 0, 0, 0, 0], values = /(-?\d+)-?(\d+)?-?(\d+)? ?(\d+)?:?(\d+)?:?(\d+)?\.?(\d+)?/ - .exec(string).slice(1); + .exec(string); if (values) { + values.shift(); date = new Date(); values = values.map(function(v, i) { return v ? (i == 6 ? Ox.pad(v, 3, '0') : v) : defaults[i];