Esempio n. 1
0
 static function birthDatesAreCompatible(LsDate $d1, LsDate $d2, $maxYearDiff = 1)
 {
     if ($d1->isblank() || $d2->isBlank()) {
         return true;
     } elseif (abs($d1->getYear() - $d2->getYear()) <= $maxYearDiff && LsLogic::areCompatible($d1->getMonth(true), $d2->getMonth(true)) && LsLogic::areCompatible($d1->getDay(true), $d2->getDay(true))) {
         return true;
     } else {
         return false;
     }
 }