Stock/Updater/StockSubjectUpdater.php
private function nullDateIfLowerThanToday(\DateTime $eda = null)
    {
        if (null === $eda) {
            return null;
        }

        $today = new \DateTime();
        $today->setTime(0, 0, 0);

        if ($eda < $today) {
            return null;
        }

        return $eda;
    }
private function nullDateIfLowerThanToday(\DateTime $eda = null)
    {
        if (null === $eda) {
            return null;
        }

        $today = new \DateTime();
        $today->setTime(0, 0, 0);

        if ($eda < $today) {
            return null;
        }

        return $eda;
    }
Returns the given date or null if it's lower than today.

@param \DateTime|null $eda

@return \DateTime|null