From: phasefx Date: Tue, 10 Aug 2010 16:16:49 +0000 (+0000) Subject: easier to read and corrected regexp for munging iso8601 dates so that they're usable... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=ee079b876628424f143938bdc184d7af9f28b7a0;p=evergreen%2Fbjwebb.git easier to read and corrected regexp for munging iso8601 dates so that they're usable by dojo git-svn-id: svn://svn.open-ils.org/ILS/trunk@17150 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/chrome/content/util/date.js b/Open-ILS/xul/staff_client/chrome/content/util/date.js index c8a56eb80..4ee891850 100644 --- a/Open-ILS/xul/staff_client/chrome/content/util/date.js +++ b/Open-ILS/xul/staff_client/chrome/content/util/date.js @@ -48,7 +48,7 @@ util.date.timer_elapsed = function (id) { util.date.db_date2Date = function (db_date) { if (typeof window.dojo != 'undefined') { dojo.require('dojo.date.stamp'); - return dojo.date.stamp.fromISOString( db_date.replace( /^(\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d-\d\d)(\d\d)$/, '$1:$2') ); + return dojo.date.stamp.fromISOString( db_date.replace( /^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}[\+-]\d{2})(\d{2})$/, '$1:$2') ); } else { var y = db_date.substr(0,4); var mo = db_date.substr(5,2);