easier to read and corrected regexp for munging iso8601 dates so that they're usable...
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 10 Aug 2010 16:16:49 +0000 (16:16 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 10 Aug 2010 16:16:49 +0000 (16:16 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@17150 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/chrome/content/util/date.js

index c8a56eb..4ee8918 100644 (file)
@@ -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);