Page 1 of 1

PHP time functions

Posted: Fri Sep 28, 2007 9:43 am
by Flamie
Hey guys, I'm wondering if theres an easy way to get the timestamp for monday at midnight of the current week, and friday midnight of the current week.

I thought of using strtotime's "last monday", but if the day is monday it will go 1 week behind.

Of course I can make some conditional checks and fix this, but I'm wondering if theres an easier way to go at it.

Thanks.

Posted: Fri Sep 28, 2007 10:18 am
by feyd
mktime() mixed with a few date() calls would work.