CronExpression_FieldInterface::increment()publicWC 1.0

When a CRON expression is not satisfied, this method is used to increment or decrement a DateTime object by the unit of the cron field

Method of the class: CronExpression_FieldInterface{}

No Hooks.

Return

CronExpression_FieldInterface.

Usage

$CronExpression_FieldInterface = new CronExpression_FieldInterface();
$CronExpression_FieldInterface->increment( $date, $invert );
$date(DateTime) (required)
DateTime object to change
$invert(true|false)
(optional) Set to TRUE to decrement
Default: false

CronExpression_FieldInterface::increment() code WC 7.3.0

public function increment(DateTime $date, $invert = false);