updated packages

This commit is contained in:
2019-05-18 09:06:43 +00:00
parent 901d16349e
commit e9487fa58a
2025 changed files with 30366 additions and 49653 deletions
@@ -3,6 +3,7 @@
namespace Cron;
use DateTime;
use DateTimeInterface;
/**
* Day of month field. Allows: * , / - ? L W
@@ -24,7 +25,14 @@ use DateTime;
*/
class DayOfMonthField extends AbstractField
{
/**
* @inheritDoc
*/
protected $rangeStart = 1;
/**
* @inheritDoc
*/
protected $rangeEnd = 31;
/**
@@ -59,7 +67,10 @@ class DayOfMonthField extends AbstractField
}
}
public function isSatisfiedBy(DateTime $date, $value)
/**
* @inheritDoc
*/
public function isSatisfiedBy(DateTimeInterface $date, $value)
{
// ? states that the field value is to be skipped
if ($value == '?') {
@@ -88,14 +99,17 @@ class DayOfMonthField extends AbstractField
return $this->isSatisfied($date->format('d'), $value);
}
public function increment(DateTime $date, $invert = false)
/**
* @inheritDoc
*
* @param \DateTime|\DateTimeImmutable &$date
*/
public function increment(DateTimeInterface &$date, $invert = false)
{
if ($invert) {
$date->modify('previous day');
$date->setTime(23, 59);
$date = $date->modify('previous day')->setTime(23, 59);
} else {
$date->modify('next day');
$date->setTime(0, 0);
$date = $date->modify('next day')->setTime(0, 0);
}
return $this;