RE: [PHP] Determine week

From: Date: Sun, 16 Jun 2002 02:02:23 +0000
Subject: RE: [PHP] Determine week
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-102370@lists.php.net to get a copy of this message
You'll need a combination of date() and mktime(). I'm too lazy to write the exact code right now, but date('w') will return the day of the week, 0 = Sunday, 6 = Saturday. Then use mktime() to subtract the number returned from date('w') from the days component, and you'll have the start of the week. 6 minus the result of date('w'), added to the day component of mktime(), will give you the end... HTH, ---John Holmes... > -----Original Message----- > From: Rosen [mailto:rosen@pernikinfo.com] > Sent: Saturday, June 15, 2002 7:55 PM > To: php-general@lists.php.net > Subject: [PHP] Determine week > > Hi, > how can I determine dates (start & end ) in one week. > I.e. 30th week is between 22.07.2002 and 28.07.2002 . > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#102370) next »