Re: RE: [PHP] how to get the date of this Saturday all the time?

From: Date: Wed, 25 Jun 2003 00:24:05 +0000
Subject: Re: RE: [PHP] how to get the date of this Saturday all the time?
Groups: php.general 
Request: Send a blank email to php-general+get-152678@lists.php.net to get a copy of this message
hi, Jennifer Goodie£¡ How quickly you are! Thank you,I'm testting now:) ======= 2003-06-24 17:20:00 you wrote£º======= >> We have a meeting at every Saturday,I'd like to post the >> news and write the date of this Saturday every week,how can I get >> the date of Saturday. > > >This has not been tested, there might be a bug. ><?php >function get_sat_ts($timestamp){ > $dow = date("w",$timestamp); > $days_to_add = 6 - $dow; > $ts_sat = mktime >(0,0,0,date("m",$timestamp),date("d",$timestamp)+$days_to_add,date("y",$time >stamp)); > return ($ts_sat); >} >$ts = get_sat_ts(time()); >echo date("Y-d-m",$ts); >?> > >Something like that should be what you want though. > > > >. = = = = = = = = = = = = = = = = = = = = ¡¡¡¡¡¡Thanks for your kindness. ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡poetbox ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡phplist@enorth.com.cn ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡2003-06-25

« previous php.general (#152678) next »