• Модуль: sender
  • Путь к файлу: ~/bitrix/modules/sender/lib/dispatch/methodschedule.php
  • Класс: BitrixSenderDispatchMethodSchedule
  • Вызов: MethodSchedule::getDateTimeByData
private function getDateTimeByData(array $months = [], array $days = [])
{
	if (empty($months))
	{
		for ($i = 1; $i <= 12; $i++)
		{
			$months[] = $i;
		}
	}
	if (empty($days))
	{
		for ($i = 1; $i <= 31; $i++)
		{
			$days[] = $i;
		}
	}
	foreach ([false, true] as $nextYear)
	{
		foreach ($months as $month)
		{
			foreach ($days as $day)
			{
				$date = $this->getDateTime($month, $day, $nextYear);
				if ($this->checkDateTime($date))
				{
					return $date;
				}
			}
		}
	}

	return null;
}