moved to Number object to prevent parseInt failures
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 7 Aug 2006 20:17:33 +0000 (20:17 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 7 Aug 2006 20:17:33 +0000 (20:17 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5340 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/common/js/utils.js

index 62c9f5d..7f1976f 100644 (file)
@@ -590,14 +590,23 @@ function buildDate( year, month, day, hours, minutes, seconds ) {
        if(!seconds) seconds = 0;
 
        var d = new Date(year, month - 1, day, hours, minutes, seconds);
+       
+       _debug('created date with ' +
+               (d.getYear() + 1900) +'-'+
+               (d.getMonth() + 1) +'-'+
+               d.getDate()+' '+
+               d.getHours()+':'+
+               d.getMinutes()+':'+
+               d.getSeconds());
+
 
        if( 
                (d.getYear() + 1900) == year &&
                d.getMonth()    == (month - 1) &&
-               d.getDate()             == parseInt(day) &&
-               d.getHours()    == parseInt(hours) &&
-               d.getMinutes() == parseInt(minutes) &&
-               d.getSeconds() == parseInt(seconds) ) {
+               d.getDate()             == new Number(day) &&
+               d.getHours()    == new Number(hours) &&
+               d.getMinutes() == new Number(minutes) &&
+               d.getSeconds() == new Number(seconds) ) {
                return d;
        }