$days_per_month = [31, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
if (date('L', $calendars[0]->getStart())) {
$days_per_month[2]++;
}
?>
for ($i = 1; $i < 13; $i++) : ?>
$ts_month += ( $days_per_month[$i] - 1) * 86400; ?>
|
= strftime('%B', $ts_month); ?>
|
endfor; ?>
$now = date('Ymd'); ?>
for ($i = 1; $i < 32; $i++) : ?>
for ($month = 1; $month < 13; $month++) : ?>
$aday = mktime(12, 0, 0, $month, $i, date('Y', $calendars[0]->getStart())); ?>
if ($i <= $days_per_month[$month]) : ?>
$wday = date('w', $aday);
// emphasize current day
if (date('Ymd', $aday) == $now) {
$day_class = ' class="celltoday"';
} else if ($wday == 0 || $wday == 6) {
$day_class = ' class="weekend"';
} else {
$day_class = ' class="weekday"';
}
?>
if ($month == 1) : ?>
| height="25">
else : ?>
| >
endif; ?>
$tooltip = $this->render_partial('calendar/group/_tooltip_year',
['aday' => $aday, 'calendars' => $calendars, 'count_lists' => $count_lists]) ?>
if (trim($tooltip)) : ?>
| >
endif; ?>
$weekday = strftime('%a', $aday); ?>
$hday = holiday($aday); ?>
if ($hday['col'] == '1') : ?>
if (date('w', $aday) == '0') : ?>
= $i ?> = $weekday; ?>
$count++; ?>
else : ?>
= $i ?> = $weekday; ?>
endif; ?>
elseif ($hday['col'] == '2' || $hday['col'] == '3') : ?>
if (date('w', $aday) == '0') : ?>
= $i ?> = $weekday; ?>
$count++; ?>
else : ?>
= $i ?> = $weekday; ?>
endif; ?>
else : ?>
if (date('w', $aday) == '0') : ?>
= $i ?> = $weekday; ?>
$count++; ?>
else : ?>
= $i ?> = $weekday; ?>
endif; ?>
endif; ?>
if (trim($tooltip)) : ?>
|
style="text-align: right;" data-tooltip="">
= Icon::create('date', 'clickable', ['title' => $event_count_txt])->asImg(16, ["alt" => $event_count_txt]); ?>
= $tooltip ?>
|
endif; ?>
|
else : ?>
|
endif; ?>
endfor; ?>
endfor; ?>
$ts_month = 0; ?>
for ($i = 1; $i < 13; $i++) : ?>
$ts_month += ( $days_per_month[$i] - 1) * 86400; ?>
|
= strftime('%B', $ts_month); ?>
|
endfor; ?>
|