@for($h = 0; $h < 24; $h += 0.5)
{{$time = gmdate("H:i", $h * 3600)}} uur
@endfor
@php($date = null) @php($hour = 0) @php($now = new \DateTime("now")) @foreach($schedule as $item) @php($diff = $item['endtime']->diff($item['starttime'])) @php($duration = $diff->d * 24 + $diff->h + $diff->i / 60) @php($isCurrent = ($now >= $item['starttime']) && ($now <= $item['endtime'])) @php($class = ($item['program']->priority < 2 ? ' special' : '') . ($item['program']->nonstop || $item['program']->rerun ? ' non-stop' : '') . ($isCurrent ? ' current' : '')) @php($starttime = $item['starttime']) @while($duration > 0) @if(($formattedDate = Formatter::fullDate($starttime, 'W d/M')) != $date) @if($date != null)
@endif
{{$formattedDate}}
@php($date = $formattedDate) @php($hour = 0) @endif @php($durationToday = ($hour + $duration <= 24) ? $duration : (24 - $hour))
{{$item['program']->name}}
@if($isCurrent)
Nu op NH Gooi
@endif
{{$item['starttime']->format('H:i')}} – {{$item['endtime']->format('H:i')}} uur.
{{Formatter::excerpt($item['program']->description, 150)}}
@php($hour += $durationToday) @php($duration -= $durationToday) @if($duration > 0) @php($starttime->add(new \DateInterval('P1D'))->setTime(0, 0, 0)) @endif @endwhile @endforeach