lib/Utils/DateTimeUtils.php
public static function isBetweenDates(?DateTimeInterface $date = null, ?DateTimeInterface $from = null, ?DateTimeInterface $to = null): bool
    {
        $date = $date ?? self::createFromTimestamp();

        if ($from instanceof DateTimeInterface && $date < $from) {
            return false;
        }

        if ($to instanceof DateTimeInterface && $date > $to) {
            return false;
        }

        return true;
    }
public static function isBetweenDates(?DateTimeInterface $date = null, ?DateTimeInterface $from = null, ?DateTimeInterface $to = null): bool
    {
        $date = $date ?? self::createFromTimestamp();

        if ($from instanceof DateTimeInterface && $date < $from) {
            return false;
        }

        if ($to instanceof DateTimeInterface && $date > $to) {
            return false;
        }

        return true;
    }
public static function isBetweenDates ( ? DateTimeInterface $ date = null , ? DateTimeInterface $ from = null , ? DateTimeInterface $ to = null ) : bool { $ date = $ date ?? self :: createFromTimestamp ( ) ; if ( $ from instanceof DateTimeInterface && $ date < $ from ) { return false ; } if ( $ to instanceof DateTimeInterface && $ date > $ to ) { return false ; } return true ; }
Returns if the provided DateTime instance is between the provided dates.
Returns if the provided DateTime instance is between the provided dates .