if ((($year % 4 == 0) && ($year % 100 != 0)) || ($year % 400) == 0) {$nod=$nod-365} else {$nod=$nod-366}; #check for the leap year.