Hello,
I'm a sysadmin who just took over a php application and have no php training. I have this function:
function verify_uspap_completion_date($d)
{
@list($mm,$dd,$yyyy) = @explode("/",$d,3);
if(!@checkdate($mm,$dd,$yyyy)) return false;
if($yyyy < date("Y")-2 || $yyyy > intval(date("Y"))) return false;
return true;
}
I need to change the rule (line 4 if you don't count brackets)
if($yyyy < date("Y")-2 || $yyyy > intval(date("Y"))) return false;
...to a "number of days" calc where it's false when the date is greater than two years ago. The version above would seem to allow dates back to 1/1/2005, when I need to limit it to 10/16/2005 (as of today).
BTW, this is version 4.x on a Mac server.
TIA,
Steve.