I converting do date some inputs variables with date_create_from_format, but in line with $diff2
showing me error 'Could not be converted to a string' I don't know why... code looks like
/*
array['id'] = el.attr('data-id');
array['name'] = el.attr('data-name');
array['place'] = el.attr('data-place');
array['color'] = el.attr('data-color');
array['day'] = $(this).attr('data-day');
array['month'] = $(this).attr('data-month');
array['year'] = $(this).attr('data-year');
array['interval'] = el.attr('data-interval');
array['notification'] = el.attr('data-notification');
array['hourFrom'] = formatTime(mousingDayH);
array['hourFrom'] = formatTime(mousingDayM);
arra['hour'] = formatTime(el.attr('data-hour'));
array['minutes'] = formatTime(el.attr('data-minutes'));
array['hourTo'] = formatTime(el.attr('data-hourTo'));
array['minutesTo'] = formatTime(el.attr('data-minutesTo'));
*/
function updateDayCalendarEventInTimelineByDrag($array){
global $db;
$array->hour = intval($array->hour);
$array->minutes = intval($array->minutes);
$array->hourFrom = intval($array->hourFrom);
$array->minutesFrom = intval($array->minutesFrom);
$array->hourTo = intval($array->hourTo);
$array->minutesTo = intval($array->minutesTo);
($array->hour <= 9 ? $array->hour = '0'.$array->hour : $array->hour = $array->hour);
($array->minutes <= 9 ? $array->minutes = '0'.$array->minutes : $array->minutes = $array->minutes);
($array->hourFrom <= 9 ? $array->hourFrom = '0'.$array->hourFrom : $array->hourFrom = $array->hourFrom);
($array->minutesFrom <= 9 ? $array->minutesFrom = '0'.$array->minutesFrom : $array->minutesFrom = $array->minutesFrom);
($array->hourTo <= 9 ? $array->hourTo = "0".$array->hourTo : $array->hourTo = $array->hourTo);
($array->minutesTo <= 9 ? $array->minutesTo = '0'.$array->minutesTo : $array->minutesTo = $array->minutesTo);
$diff2 = date_create_from_format("G:i/j.n.Y", $array->hourTo.":".$array->minutesTo."/".$array->day.".".$array->month.".".$array-year);
echo $diff2;`
}
`