![]() |
|
Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: What is the best way to get a list of all Mondays until the end of the year?by grinder (Bishop) |
on Aug 19, 2008 at 11:34 UTC ( #705178=note: print w/replies, xml ) | Need Help?? |
What is the best way... Perhaps something using Date::Calc. The idea would be to take a date in the year, find the next monday, and if the year is the same, print it out. Then, keep adding 7 days until the year changes.
update: it occurs to me that it may not be obvious how this calculates Mondays, since it uses a magic number. It would be a little clearer had I written:
• another intruder with the mooring in the heart of the Perl
In Section
Seekers of Perl Wisdom
|
|