upcoming broadcasts

= $start_ts) && ($ch_ts < $end_ts)); } // Create a date range between the schedule start and end dates $begin = new DateTime($schedule[0]['start']); $end = new DateTime(end($schedule)['start']); $daterange = new DatePeriod($begin, new DateInterval('P1D'), $end); ?> format('Y-m-d') . ' ' . date('H:i:s', $time + $i)); // Set id for this time span, for referencing in JS. $props = 'id="show-' . $merge->getTimestamp() . '"'; // We'll now use $merge to see if any shows are airing at this time $matchedshow = null; foreach ($schedule as $show) { if (check_in_range($show['start'], $show['end'], $merge->format('Y-m-d H:i:s'))) { $matchedshow = $show; break; } } $active = false; if (!$wrotepointer) { // If current time is in this range, draw pointer. $end = DateTimeImmutable::createFromMutable($merge)->add($halfhour); if ($now >= $merge && $now < $end) { $active = true; $props .= ' class="active"'; } } echo "\n"; } ?>
format("d") ?> format("l") ?> format("D") ?>
:00 "; if ($matchedshow) { echo '
' . $matchedshow['title'] . '
'; // if no match was found, leave an empty node } if ($active) { // Cell height here should be synced with height of '.calendar tbody tr td' in ../css/calendar.css $height = 32; $top = round(date_diff($merge, $now)->format('%i') / 30 * ($height-1)); echo '
'; $wrotepointer = true; } echo "