$date = strtotime(date("Y-m-d"));
$day = date("d", $date);
$month = str_pad($_GET["m"],2,"0",STR_PAD_LEFT);
$year = date("Y", $date);
$firstDay = mktime(0,0,0,$month, 1, $year);
$title = strftime("%m", $firstDay);
$dayOfWeek = date("D", $firstDay);
$daysInMonth = cal_days_in_month(0, $month, $year);
$timestamp = strtotime("next Sunday");
$weekDays = array("", "", "", "", "", "", "");
for ($i = 0; $i < 7; $iPP){
$timestamp = strtotime("+1 day", $timestamp);
}
$blank = date("w", strtotime("{$year}-{$month}-01"));
<td><?if($_GET["m"]!="01"){?><a class="monthLink" href="?m=<?=str_pad($month-1,2,"0",STR_PAD_LEFT);?>&y=<?=$year;?>®ion=<?=$_GET["region"];?>"> <?=$month-1;?></a><?}?></td>
I use = $month-1;? >
or = $month+1;? >
to select a month
, but in January it will become 00 month
if he can start in December of the previous year?
and starting in January of the following year? There will be no mistakes