private function getDifference($value): ?int
    {
        // Let's prepare the dates...
        $now = (new \DateTime())->setTime(0, 0);
        $date = Date::getDateTime($value);

        // ...and make comparison with "day" as unit
        if ($date instanceof \DateTime) {
            return Date::getDateDifference($now, $date, Date::DATE_DIFFERENCE_UNIT_DAYS);
        }

        return null;
    }
private function getDifference($value): ?int
    {
        // Let's prepare the dates...
        $now = (new \DateTime())->setTime(0, 0);
        $date = Date::getDateTime($value);

        // ...and make comparison with "day" as unit
        if ($date instanceof \DateTime) {
            return Date::getDateDifference($now, $date, Date::DATE_DIFFERENCE_UNIT_DAYS);
        }

        return null;
    }
private function getDifference ( $ value ) : ? int { // Let's prepare the dates... $ now = ( new \ DateTime ( ) ) -> setTime ( 0 , 0 ) ; $ date = Date :: getDateTime ( $ value ) ; // ...and make comparison with "day" as unit if ( $ date instanceof \ DateTime ) { return Date :: getDateDifference ( $ now , $ date , Date :: DATE_DIFFERENCE_UNIT_DAYS ) ; } return null ; }
Returns difference between validated date and today

@param mixed $value Value to validate
@return null|int
Returns difference between validated date and today