[PHP-DB] MySQL/PHP date functions

2002-02-20 Thread Markus Lervik

Hello, all!

Can anyone tell me how to easily calculate which days are on which week?
ie, week 8 : 18. Feb - 24. Feb? I retrieve information from a database
on a weekly basis, and I'd like print out what range of dates are on a 
specific week. I know about date(W...), but I really don't want to
loop through all dates possible just to find if they are on that
particular week.. 
(my explanation might be a bit confusing, I'm dead tired :)

Cheers,
markus

-- 
Markus Lervik
Linux-administrator with a kungfoo grip
Vaasa City Library - Regional Library
[EMAIL PROTECTED]
+358-6-325 3589 / +358-40-832 6709


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] MySQL/PHP date functions

2002-02-20 Thread Markus Lervik

On Wed, 2002-02-20 at 13:16, Sven Jacobs wrote:
 You can do it like this 
 calculate the current day and extract 7 days of it 

ehm? extract 7 days of it? from what?-) I'm not quite following...

 then with an array the current day until the calculated day :-) 

ehm, call me stupid, but I didn't get it. ;) You wouldn't mind posting
a snippet? might be easier for poor retarded me to understand. :)

 May not 100 % what you are looking for but it works 


What I just came up with, teasing my (few) little gray ones, is
calculate backwards until date(W) gives 8, add one, and we have 
monday the whateverth, right?-) 

Cheers,
Markus

-- 
Markus Lervik
Linux-administrator with a kungfoo grip
Vaasa City Library - Regional Library
[EMAIL PROTECTED]
+358-6-325 3589 / +358-40-832 6709


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php