setTimestamp(strtotime("this week")); for ($n = 0; $n < 7; ++$n) { $res[] = IntlDateFormatter::formatObject($date, "ccc"); $date->add($ONE_DAY); } return $res; } $DAYS_OF_WEEK = get_days_of_week(); function print_month($start) { global $DAYS_OF_WEEK, $ONE_DAY, $EVENTS; $month_start = (new DateTimeImmutable())->setTimestamp(strtotime("first day of this month", $start->getTimestamp())); $week_start = (new DateTimeImmutable())->setTimestamp(strtotime("this week", $month_start->getTimestamp())); $month_end = (new DateTimeImmutable())->setTimestamp(strtotime("+1 month", $month_start->getTimestamp())); $month_name = IntlDateFormatter::formatObject($month_start, "MMMM yyyy"); ?>
"; $label = IntlDateFormatter::formatObject($date, "dd"); if ($invalid) { echo $label; } else { $id = IntlDateFormatter::formatObject($date, "yyyy-MM-dd"); echo ""; } echo " | "; $date->add($ONE_DAY); } } ?>