- date: documentation ( source)
- strtotime: documentation ( source)
- strtolower: documentation ( source)
<?php
for($offset = 0; ; $offset -= 60 * 60 * 24){
$time = strtotime("now") + $offset;
$now = date('D',$time);
echo $now . "\n";
if( strtolower($now) == 'mon' ){
break;
}
}
echo date("m-d-Y",$time) . "\n";
?>