rem: inDate = inDate.split("/"); if(inDate[1].indexOf("0") != -1) inDate[1] = inDate[1].replace("0",""); if(inDate[0].indexOf("0") != -1) inDate[0] = inDate[0].replace("0","");  calDate = new Date(inDate[2],inDate[1]-1,inDate[0]); 
add: if(inDate.indexOf("/") > -1) { inDate = inDate.split("/"); if(inDate[1].indexOf("0") > -1) inDate[1] = inDate[1].replace("0",""); if(inDate[0].indexOf("0") > -1) inDate[0] = inDate[0].replace("0",""); calDate = new Date(inDate[2],inDate[1]-1,inDate[0]); } else calDate = new Date(inDate); 
context: function setInitialDate() {       // CREATE A NEW DATE OBJECT (WILL GENERALLY PARSE CORRECT DATE EXCEPT WHEN "." IS USED AS A DELIMITER)    // (THIS ROUTINE DOES *NOT* CATCH ALL DATE FORMATS, IF YOU NEED TO PARSE A CUSTOM DATE FORMAT, DO IT HERE)    	inDate = inDate.split("/");	if(inDate[1].indexOf("0") != -1)		inDate[1] = inDate[1].replace("0","");	if(inDate[0].indexOf("0") != -1)		inDate[0] = inDate[0].replace("0","");		calDate = new Date(inDate[2],inDate[1]-1,inDate[0]);	    // IF THE INCOMING DATE IS INVALID, USE THE CURRENT DATE    if (isNaN(calDate)) {        // ADD CUSTOM DATE PARSING HERE        // IF IT FAILS, SIMPLY CREATE A NEW DATE OBJECT WHICH DEFAULTS TO THE CURRENT DATE        calDate = new Date();    }    // KEEP TRACK OF THE CURRENT DAY VALUE    calDay  = calDate.getDate();    // SET DAY VALUE TO 1... TO AVOID JAVASCRIPT DATE CALCULATION ANOMALIES    // (IF THE MONTH CHANGES TO FEB AND THE DAY IS 30, THE MONTH WOULD CHANGE TO MARCH    //  AND THE DAY WOULD CHANGE TO 2.  SETTING THE DAY TO 1 WILL PREVENT THAT)    calDate.setDate(1);}
meta: 3540	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/3540/0c5e9765c21efce4fcbc0fe8d450d9971e6229cd/lib_calendar.js/clean/htdocs/lib/lib_calendar.js