Welcome to the Monastery | |
PerlMonks |
Re: Timestamp of last mondayby ww (Archbishop) |
on Nov 19, 2011 at 21:27 UTC ( [id://939003]=note: print w/replies, xml ) | Need Help?? |
And you've no doubt considered what to do in those cases in which Monday is a holiday and (iggerant) users simply run the job on their first workday of the week?
PS: Ratazong's suggestion implicitly offers an algorithm to avoid the problem above: Identify week number of current week and of the previous Monday... and if those are the same, adjust Monday_of_Week as required. PPS: Christoforo's reply has a solution, too.
In Section
Seekers of Perl Wisdom
|
|