in reply to Lady /DATE
wouldn't work (or pass -w) until:use lib '.'; use lady_date; my $date = new Lady_DATE; print $date->get_days_since_new_year(3,1);
sub get_days_since_new_year{ my $self = shift; my ($__month, $__day) = @_; my (@monthdays); @monthdays = ("31","28","31","30","31","30","31","31","30","31","30"," +31"); my $days = 0; # you want to skip this month and only go back Feb. Jan # 01/01 should return 1, not 31+1 while (--$__month > 0){ $days = $days + $monthdays[$__month]; }
a
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Lady /DATE
by Steeeeeve (Initiate) on Feb 02, 2001 at 13:24 UTC | |
by a (Friar) on Feb 03, 2001 at 12:29 UTC | |
by chipmunk (Parson) on Feb 05, 2001 at 07:49 UTC | |
by a (Friar) on Feb 05, 2001 at 09:38 UTC |