At 05:06 PM 12/6/01 +0000, Shinagare, Sandeep wrote:
>Hi All,
>I am trying to find the date, month and year of the next Monday given any
>day.
>I am using this to get todays date/day/month etc. Is there a way to use
>this
>information to get the next Monday?
>
>#snip-start
> $thisday=(Sun,Mon,Tue,Wed,Thu,Fri,Sat)[(localtime)[6]];
> $thisdate=(localtime)[3];
>
>$thismonth=(Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sept,Oct,Nov,Dec)[(localtime)[4]
>];
> $thisyear=(localtime)[5] + 1900;
>#snip-end
Would you believe:
use Date::Manip;
($thisyear,$thismonth,$thisday) = UnixDate("next Monday", "%Y","%m","%d");
--
Peter Scott
Pacific Systems Design Technologies
http://www.perldebugged.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]