Lines Matching refs:date
13 public function isSatisfiedBy(DateTime $date, $value)
15 return $this->isSatisfied($date->format('H'), $value);
18 public function increment(DateTime $date, $invert = false, $parts = null)
24 $timezone = $date->getTimezone();
25 $date->setTimezone(new DateTimeZone('UTC'));
27 $date->modify('-1 hour');
29 $date->modify('+1 hour');
31 $date->setTimezone($timezone);
33 $date->setTime($date->format('H'), $invert ? 59 : 0);
43 $current_hour = $date->format('H');
56 if ((!$invert && $date->format('H') >= $hour) || ($invert && $date->format('H') <= $hour)) {
57 $date->modify(($invert ? '-' : '+') . '1 day');
58 $date->setTime($invert ? 23 : 0, $invert ? 59 : 0);
61 $date->setTime($hour, $invert ? 59 : 0);