From 004198c8d60efe2bb1bae8a6cd11d0c574cfb580 Mon Sep 17 00:00:00 2001 From: Jason Etheridge Date: Fri, 24 Feb 2012 14:36:16 -0500 Subject: [PATCH] lp928937, null date sorting Changes util.date.db_date2Date so that nulls are not converted into the epoch. This fixes date sorting in XUL-based lists in the staff client such that unset dates are listed before actual dates. Signed-off-by: Jason Etheridge Signed-off-by: Mike Rylander --- Open-ILS/xul/staff_client/chrome/content/util/date.js | 1 + 1 file changed, 1 insertion(+) 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 4ee891850a..cf176271b9 100644 --- a/Open-ILS/xul/staff_client/chrome/content/util/date.js +++ b/Open-ILS/xul/staff_client/chrome/content/util/date.js @@ -46,6 +46,7 @@ util.date.timer_elapsed = function (id) { } util.date.db_date2Date = function (db_date) { + if (!db_date) { return db_date; } if (typeof window.dojo != 'undefined') { dojo.require('dojo.date.stamp'); 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') ); -- 2.11.0