Check if the minute matches.

@param \DateTime $now

@return bool
960326
protected function checkMinute(\DateTime $now)
    {
        if ($this->parts['min'] != '*') {
            foreach ($this->parseRule($this->parts['min'], 0, 59) as $value) {
                if ($now->format('i') == $value) {
                    return true;
                }
            }

            return false;
        }

        return true;
    }
886901
public function matchTime($time)
    {
        return $this->matchPart(
            $time,
            $this->formatRegex[$this->format][self::STRTIME]
        );
    }
49056
public static function isValidTime($time)
    {
        if (preg_match('^(0|1|2)[0-9]([:](0|1|2|3|4|5)[0-9]){2}$', $time)) {
            $hour   = (int)substr($time, 0, 2);
            $minute = (int)substr($time, 3, 2);
            $second = (int)substr($time, 6, 2);
            if ($hour < 24 && $minute < 60 && $second < 60) {
                return true;
            } else {
                return false;
            }
        } else {
            return false;
        }
    }
523832
protected function isTomorrow(DateTime $date)
    {
        $tomorrow = new DateTime('+1 day');
        $start = new DateTime($tomorrow->format('Y-m-d') . ' 00:00:00');
        $end   = new DateTime($tomorrow->format('Y-m-d') . ' 23:59:59');

        if ($date->getTimestamp() >= $start->getTimestamp() && $date->getTimestamp() <= $end->getTimestamp()) {
            return true;
        }
        return false;
    }
496442
private function isDatetime($dateTime)
    {
        if (preg_match('/^(\d{4})-(\d\d?)-(\d\d?) (\d\d?):(\d\d?):(\d\d?)$/', $dateTime, $matches)) {
            return checkdate($matches[2], $matches[3], $matches[1]) && $matches[4] / 24 < 1 && $matches[5] / 60 < 1 && $matches[6] / 60 < 1;
        }
        return false;
    }
140936
public function findInvalid($datetime = null)
    {
        $datetime = (null === $datetime) ? new \DateTime() : $datetime;

        $queryBuilder = $this->createQueryBuilder()
            ->field('valid')->lt($datetime);

        return $queryBuilder->getQuery()->execute();
    }
248087
public function isDateWillComeIn($interval)
    {
        if (!($interval instanceof \DateInterval)) {
            $interval = new \DateInterval((string) $interval);
        }
        $now = new \DateTime('now');
        return 0 === $this->diff($now->add($interval))->invert;
    }
706454
public static function isYesterday($time): bool
    {
        return (self::factory($time)->format('Y-m-d') === self::factory('yesterday')->format('Y-m-d'));
    }
1194903
public static function dayToNow($day = 1, $now = true)
    {
        $end = time();
        if (!$now) {
            list($foo, $end) = self::yesterday();
        }

        return [
            mktime(0, 0, 0, date('m'), date('d') - $day, date('Y')),
            $end
        ];
    }
461181
public function check($value) : bool
    {
        try {
            if (false == \DateTime::createFromFormat($this->rule, $value)) {
                return false;
            }
            return true;
        } catch (\Exception $e) {
            return false;
        }
    }
386133
public static function isValideTime($hour, $minute, $second) {
        return $hour >= 0 && $hour <= 24
        && $minute >= 0 && $minute <= 59
        && $second >= 0 && $second <= 59;
    }
446560
public function equals($value)
    {
        if ($value instanceof \DateTime) {
            $timestamp = $value->getTimeStamp();
        } else {
            $timestamp = strtotime($value);
        }

        return ($timestamp == $this->value->getTimeStamp());
    }
729113
public function isDateOlderThanDays(\DateTime $date, $days)
    {
        $now = new \DateTime();

        return ($now->diff($date)
                    ->format('%a') >= $days);
    }
357740
public static function getHourTimestamp($now = null) {
        $now = $now === null ? time() : $now;
        $diff = $now % 3600; // 1 * 60 * 60;
        return $now - $diff;
    }
1371094
public function findInvalid($datetime = null)
    {
        $datetime = (null === $datetime) ? new \DateTime() : $datetime;

        return $this->createQueryBuilder('u')
            ->where('u.valid < :datetime')
            ->setParameter(':datetime', $datetime)
            ->getQuery()
            ->getResult();
    }
860524
public static function check(int $minuteOfHour) : void
    {
        if ($minuteOfHour < 0 || $minuteOfHour > 59) {
            throw DateTimeException::fieldNotInRange(self::NAME, $minuteOfHour, 0, 59);
        }
    }
63349
private function validateDateTime($datetime)
    {
        if (preg_match('/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})$/', $datetime, $parts) == true) {
            $time = gmmktime($parts[4], $parts[5], $parts[6], $parts[2], $parts[3], $parts[1]);

            $input_dt = new \DateTime($datetime, new \DateTimeZone('GMT0'));
            $input_time = $input_dt->getTimestamp();
            if ($input_time === false) return false;

            return $input_time == $time;
        } else {
            return false;
        }
    }