пример я в календаре нажму 1 он перейдет на сайт site.com и в url будет число 2022-11-01
если на 2 то 2022-11-02 и.т.д
date_default_timezone_set('Europe/Moscow');
if (isset($_GET['ym'])) {
$ym = $_GET['ym'];
} else {
$ym = date('Y-m');
}
$timestamp = strtotime($ym . '-01');
if ($timestamp === false) {
$ym = date('Y-m');
$timestamp = strtotime($ym . '-01');
}
$today = date('Y-m-j');
$title = date('F, Y', $timestamp);
$prev = date('Y-m-d', strtotime('-1 month', $timestamp));
$next = date('Y-m-d', strtotime('+1 month', $timestamp));
$day_count = date('t', $timestamp);
$str = date('N', $timestamp);
$weeks =[];
$week = '';
$week .= str_repeat('<td> </td>', $str - 1);
for ($day = 1; $day <= $day_count; $day++, $str++) {
$date = $ym . '-' . $day;
$data=date('Y-m-d');
if ($today == $date ) {
$week .='<td> <a class="today" >';
} else {
$week .= '<td> ';
}
$week .='<a type="button">';
$week .= $day . '</td>';
if ($str % 7 == 0 || $day == $day_count) {
if ($day == $day_count && $str % 7 != 0) {
$week .= str_repeat('<td></td>', 7 - $str % 7);
}
$weeks[] = '<tr> ' . $week . '</tr>';
$week = '';
}
}