note 98063 added to function.date

[email protected]
Newsgroups php.notes
Message-ID <[email protected]>
Printing current week with dates from Monday to Sunday:
<?php
        $month = date("m");
	$year = date("Y");
	$date = date("d");
	$day = date("N");
	$week_no = date("W");
	if( $week_no == 1 && $day > $date ){
		$year = $year - 1;
		$month = 11;
		$date = 31 - $day - $date;
	} else {
		$date = $date-$day+1;
	}
	$st_week_time = mktime(0, 0, 0, $month, $date, $year);
        $i = 0;
  	while($i < 7){
		if($i > 0){
			$st_week_time += 86400;
           }
        echo date("l (d.m.Y)", $st_week_time);//print dates of from Monday to Sunday of current week
        $i++;
	}
?>
----
Server IP: 69.147.83.197
Probable Submitter: 122.180.40.81
----
Manual Page -- http://www.php.net/manual/en/function.date.php
Edit        -- https://master.php.net/note/edit/98063
Del: integrated  -- https://master.php.net/note/delete/98063/integrated
Del: useless     -- https://master.php.net/note/delete/98063/useless
Del: bad code    -- https://master.php.net/note/delete/98063/bad+code
Del: spam        -- https://master.php.net/note/delete/98063/spam
Del: non-english -- https://master.php.net/note/delete/98063/non-english
Del: in docs     -- https://master.php.net/note/delete/98063/in+docs
Del: other reasons-- https://master.php.net/note/delete/98063
Reject      -- https://master.php.net/note/reject/98063
Search      -- https://master.php.net/manage/user-notes.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.