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 <jason@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
}
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') );