note 60106 deleted from function.date by derick

From: Date: Sun, 15 Jan 2006 12:34:31 +0000
Subject: note 60106 deleted from function.date by derick
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-101802@lists.php.net to get a copy of this message
Note Submitter: lch2003 at gmail dot com ---- A function to get a week ... start and end ... if ( !function_exists('get_week_start_and_end') ) { function get_week_start_and_end($year,$month,$weeks){ //Make by 2005/8/25. $weeks=$weeks+1;//Add at2005/8/26 $day=7-date("w", mktime(0,0,0,$month,1,$year))+(($weeks-1)*7); $the_date=date("w", mktime(0,0,0,$month,$day,$year)); $first_day=mktime(0,0,0,$month,$day,$year); $first_day=$first_day-(($the_date-1)*(24*3600)); $end_day=mktime(0,0,0,$month,$day,$year)+((5-$the_date)*(24*3600)); return date("Y/m/d", $first_day) . " 至 " . date("Y/m/d", $end_day); } }

« previous php.notes (#101802) next »