Heheh yeah for the day name only (not the actual date number) it's the
way to go!!

Way faster

Etienne

Adam Turoff wrote:
> 
> On Thu, Nov 15, 2001 at 03:08:48PM -0500, Glenn Cannon wrote:
> > Now all I need is a way to work out the last day of the month.  Most of them
> > should be easy, but that damn February...
> 
> Find the first day of the next month (remember december/january rollover)
> and subtract one day:
> 
>   ## hacking japhy's code a wee bit:
> 
>   use Time::Local;
>   use strict;
> 
>   my ($mon, $year) = (11, 2001);
>   my $first = timelocal(0,0,0, 1, $mon % 12, ($year-1900 + int($mon/12)));
> 
>   my $last = $first - 86_400;
> 
>   my $dow = (localtime $last)[6];
>   my $day = (qw( Sun Mon Tues Wednes Thurs Fri Satur ))[$dow] . "day";
> 
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Etienne Marcotte
Specifications Management - Quality Control
Imperial Tobacco Ltd. - Montreal (Qc) Canada
514.932.6161 x.4001

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to