in reply to unable to see entries from 1st day of the month.
Right off the bat I see some big problems.
if ($currentyear % 4) { $next = $leapdays{$currentmonth} - $currentday + 1 + $param{jumpto}; } else { $next = $nonleapdays{$currentmonth} - $currentday + 1 + $param +{jumpto}; }
This is wrong, leap years have 2 more rules associated with them.
Anytime I think to myself someone has probably done this (leap years and date manipulation) before, I think, 'I should look on CPAN'. One CPAN module you'll find is Date::Calc you should run and grab this.
It's not a hard module to use and I guarentee you'll have your problem (plus others) fixed if you implement it.
|
grep> cd /pub grep> more beer |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: unable to see entries from 1st day of the month.
by mnlight (Scribe) on Mar 28, 2002 at 19:30 UTC |