WordPress at Your Fingertips
function is not described

CronExpression_MonthField::increment() public WC 1.0

{@inheritdoc}

{} It's a method of the class: CronExpression_MonthField{}

No Hooks.

Return

null. Nothing.

Usage

$CronExpression_MonthField = new CronExpression_MonthField();
$CronExpression_MonthField->increment( $date, $invert );
$date(DateTime) (required)
-
$invert **
-
Default: false

Code of CronExpression_MonthField::increment() WC 6.1.1

public function increment(DateTime $date, $invert = false)
{
    if ($invert) {
        // $date->modify('last day of previous month'); // remove for php 5.2 compat
        $date->modify('previous month');
        $date->modify($date->format('Y-m-t'));
        $date->setTime(23, 59);
    } else {
        //$date->modify('first day of next month'); // remove for php 5.2 compat
        $date->modify('next month');
        $date->modify($date->format('Y-m-01'));
        $date->setTime(0, 0);
    }

    return $this;
}