protected function shouldSendMonthly($monthlyDay) { return parent::shouldSendMonthly($monthlyDay) && $this->isRecurrenceMonth(); }
protected function shouldSendMonthly($monthlyDay, $dateFrom) { if (!$this->wasCronStopped($dateFrom)) { return parent::shouldSendMonthly($monthlyDay); } if ($this->isLastDay() && !$this->hasSentDay($monthlyDay)) { return true; } $isThisMonth = date('m', $this->time) == date('m', Gpf_Common_DateUtils::getTimestamp($dateFrom)); if (!$isThisMonth && date('m', $this->time)-1 != date('m', Gpf_Common_DateUtils::getTimestamp($dateFrom))) { return false; } if ($isThisMonth && date('j', Gpf_Common_DateUtils::getTimestamp($dateFrom)) >= $monthlyDay) { return false; } if (date('j', $this->time) < $monthlyDay) { return false; } return true; }