<?php
/* @var $day TimeTableMonthDay */

use common\models\Event;
use common\modules\event\models\timetable\TimeTableMonthDay;
use common\modules\event\widgets\event\EventView;

?>
<h3>
    <?= $day->date->format('d') ?>
</h3>

<?php if (count($day->events) === 0) {
    echo EventView::widget(['event' => null]);
} else {
    /** @var Event $event */
    foreach ($day->events as $event) {
       echo EventView::widget(['event' => $event]);
    }
} ?>
