• Модуль: timeman
  • Путь к файлу: ~/bitrix/modules/timeman/lib/helper/form/schedule/calendarformhelper.php
  • Класс: BitrixTimemanHelperFormScheduleCalendarFormHelper
  • Вызов: CalendarFormHelper::convertDatesToDbFormat
static function convertDatesToDbFormat($dates)
{
	$res = [];
	foreach ((array)$dates as $year => $months)
	{
		$res[$year] = [];
		if (!is_array($months) || empty($months))
		{
			continue;
		}
		foreach ($months as $month => $days)
		{
			if (!is_array($days) || empty($days))
			{
				continue;
			}
			$res[$year][$month + 1] = [];
			foreach ($days as $day => $time)
			{
				$res[$year][$month + 1][$day] = $time;
			}
		}
	}
	return $res;
}