$dateTime =
(new \
DateTime()) ->
setTimestamp($date->
getTimestamp()) ->
setTime(0, 0
);
/** @var \DateInterval $interval */
$interval =
$dateTime->
diff($currentDate);
if ($this->operator === self::OPERATOR_EMPTY
) { return false;
} return RuleComparison::
numeric((int) $interval->days,
$this->daysPassed,
$this->operator
);
} public function getConstraints(): array
{ $constraints =
[ 'operator' => RuleConstraints::
numericOperators(),
];
if ($this->operator === self::OPERATOR_EMPTY
) { return $constraints;
}