handle nulls for dates
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 7 Aug 2006 19:50:07 +0000 (19:50 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 7 Aug 2006 19:50:07 +0000 (19:50 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5339 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index c955a53..bd143f4 100644 (file)
@@ -65,6 +65,8 @@ util.date.formatted_date = function (date,format) {
                }
        } else if (typeof(date) == 'undefined') {
                date = new Date( Number( date + '000' ) );
+       } else if (date == null) {
+               return '';
        }
 
        var mm = date.getMonth() + 1; mm = mm.toString(); if (mm.length == 1) mm = '0' +mm;