I got this code from here: Creation of weekly calender in php
My question is, how do I make it end up to Saturday only?
<?php
$dt = new DateTime;
if (isset($_GET['year']) && isset($_GET['week'])) {
$dt->setISODate($_GET['year'], $_GET['week']);
} else {
$dt->setISODate($dt->format('o'), $dt->format('W'));
}
$year = $dt->format('o');
$week = $dt->format('W');
?>
<center>
<a href="<?php echo $_SERVER['PHP_SELF'].'?week='.($week-1).'&year='.$year; ?>" style="padding-right: 600px">Previous Week</a> <!--Previous week-->
<a href="<?php echo $_SERVER['PHP_SELF'].'?week='.($week+1).'&year='.$year; ?>" style="padding-left: 600px">Next Week</a> <!--Next week-->
</center>
<table border="1" style="text-align: center" align="center">
<col width="100px" />
<col width="200px" />
<col width="200px" />
<col width="200px" />
<col width="200px" />
<col width="200px" />
<col width="200px" />
<tr>
<td>Time</td>
<?php
do {
echo "<td>" . $dt->format('l') . "<br>" . $dt->format('F d') . "</td>\n";
$dt->modify('+1 day');
} while ($week == $dt->format('W'));
?>