debug
This commit is contained in:
parent
ed9257cdff
commit
0c5e9765c2
@ -162,13 +162,17 @@ function setInitialDate() {
|
|||||||
// CREATE A NEW DATE OBJECT (WILL GENERALLY PARSE CORRECT DATE EXCEPT WHEN "." IS USED AS A DELIMITER)
|
// 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)
|
// (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.indexOf("/") > -1)
|
||||||
if(inDate[1].indexOf("0") != -1)
|
{
|
||||||
inDate[1] = inDate[1].replace("0","");
|
inDate = inDate.split("/");
|
||||||
if(inDate[0].indexOf("0") != -1)
|
if(inDate[1].indexOf("0") > -1)
|
||||||
inDate[0] = inDate[0].replace("0","");
|
inDate[1] = inDate[1].replace("0","");
|
||||||
|
if(inDate[0].indexOf("0") > -1)
|
||||||
calDate = new Date(inDate[2],inDate[1]-1,inDate[0]);
|
inDate[0] = inDate[0].replace("0","");
|
||||||
|
calDate = new Date(inDate[2],inDate[1]-1,inDate[0]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
calDate = new Date(inDate);
|
||||||
|
|
||||||
// IF THE INCOMING DATE IS INVALID, USE THE CURRENT DATE
|
// IF THE INCOMING DATE IS INVALID, USE THE CURRENT DATE
|
||||||
if (isNaN(calDate)) {
|
if (isNaN(calDate)) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user