On Mon, Mar 12, 2001 at 05:07:03PM +1100, John Murray wrote:
> Given you have $yearnum $monthnum $daynum as input, you want a dayname out
> of the array @monthdays defined below. Here's my untested [away from perl at
> moment] go:
>
> @daynames = ('mon','tue','wed','thu','fri','sat','sun');
> @monthdays = (31,58,89,119,150,180,211,242,272,303,333,364);
Given that there are 365 days in a year, not 364, I think something is
amiss.... Specifically, you've added 27 days for February, instead of 28.
Anyway, I would suggest using one of the Time or Date modules for this.
Ronald