On Sat, Jun 18, 2005 at 05:45:24AM -0700, Peter Scott wrote: > On Sat, 18 Jun 2005 01:38:44 +0200, Paul Johnson wrote: > > Too much work! > > > > $ perl -MDate::Manip -le 'print UnixDate Date_GetPrev("today", "sun"), "%F"' > > Or even > > $ perl -MDate::Manip -le 'print UnixDate ParseDate("last Sunday"), "%F"'
You're right, I just knew there was something along those lines. In defence of Date_GetPrev though, it does allow you to control what happens if you call the sub on a Sunday, should ParseDate not be doing what is required there. -- Paul Johnson - [EMAIL PROTECTED] http://www.pjcj.net -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>