Thanks for your replies! roboticus I had already looked at the DateTime module on CPAN but nothing stood out other than determining the week of the year and then getting the Sunday date from that as being an easy way.
BrowserUk thanks that works fine! Just would be interested if you could breakdown the line
$now -= 43200 while scalar localtime($now) !~ m[Sun];Into what is actually being done here which will help me understand exactly how the answer is acheived.
I did think after I had posted the easy way would be to take date now and just changed the day to Sunday. Could this be what you are doing?In reply to Re: Is there an easy way to get the start date of the current week?
by ramjamman
in thread Is there an easy way to get the start date of the current week?
by ramjamman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |