0

I'm trying to get the starting monday date of the actual week we are in. Like we are July 15th and would like to have the result with strtotime to return July 11th...

I've tried

strtotime("-1 weekdays");

Without luck... What could be the function for the actual week please.

Thanks

Warface
  • 5,029
  • 9
  • 56
  • 82
  • 1
    Possible duplicate of http://stackoverflow.com/questions/923925/get-start-and-end-days-for-a-given-week-in-php – Tim Jul 15 '11 at 19:12
  • The anwser below is much clearer and accurate than the one in your link. My opinion... – Warface Jul 15 '11 at 19:25

2 Answers2

2

$timestamp = strotime('monday this week');

Will give you Monday! ;)

Frankie
  • 24,627
  • 10
  • 79
  • 121
  • @Warface great! Now, in Stack Overflow style (SO) you should accept the answer if you think it helped you. That way you'll improve my reputation and you'll also get some points for yourself. You probably should spend 3 minutes reading the FAQ to familiarize yourself with the community. http://stackoverflow.com/faq. Welcome to SO. – Frankie Jul 15 '11 at 19:15
  • Yeah I had to wait 10 minutes before accepting your anwser. Sorry for the delay but it's Stack Overflow fault :D – Warface Jul 15 '11 at 19:24
  • @Warface, hehe... sorry! Just saw that you were a new member and threw you the guidelines! ;) Thks! – Frankie Jul 15 '11 at 19:27
0

Did none of these help you to find your answer?

Community
  • 1
  • 1
sdolgy
  • 6,963
  • 3
  • 41
  • 61