CronExpression::getPreviousRunDate()
Get a previous run date relative to the current date or a specific date
Метод класса: CronExpression{}
Хуков нет.
Возвращает
DateTime
.
Использование
$CronExpression = new CronExpression(); $CronExpression->getPreviousRunDate( $currentTime, $nth, $allowCurrentDate );
- $currentTime(строка|DateTime)
- (optional) Relative calculation date
По умолчанию: 'now' - $nth(int)
- (optional) Number of matches to skip before returning
- $allowCurrentDate(true|false)
- (optional) Set to TRUE to return the
php current date if it matches the cron expression
По умолчанию: false
Заметки
- Смотрите: CronExpression::getNextRunDate
Код CronExpression::getPreviousRunDate() CronExpression::getPreviousRunDate WC 8.1.1
public function getPreviousRunDate($currentTime = 'now', $nth = 0, $allowCurrentDate = false) { return $this->getRunDate($currentTime, $nth, true, $allowCurrentDate); }