I am trying to check if today's date is = 04/01/2013 in a PHP file. I have written the following JS Script. But I am getting some error. Dont know why. Please help
//This function will return if today is the date that we are looking for
function isToday($time) // midnight second
{
alert('1');
return (strtotime($time) === strtotime('today'));
}
Testing using the following:
if (isToday('2013-04-01 00:00:00.0') )
{
alert('Yes true');
}
else
{
alert("No false');
}
Please help how to compare today date = 04/01/2013. Thanks.