Re: [MacPerl-AnyPerl] input to formatted date

2001-03-12 Thread John Murray
> > @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

Re: [MacPerl-AnyPerl] input to formatted date

2001-03-12 Thread Ronald J Kimball
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'); > @mo

Re: [MacPerl-AnyPerl] input to formatted date

2001-03-12 Thread Christian Brechbuehler
Also remember that years divisible by 100 are NOT leap years. The exception to this exception is that years divisible by 400 ARE leap years. That's the Gregorian Calendar. From `man cal`: The Gregorian Reformation is assumed to have occurred in 1752 on the 3rd of September. By this

[MacPerl-AnyPerl] CGI tutorial

2001-03-12 Thread Bert Altenburg
Hi, Those interested in my interactive multimedia tutorial on CGI scripting (using MacPerl) may want to download it from www.macinstruct.com Hope you enjoy it. Bye for now, Bert

Re: [MacPerl-AnyPerl] input to formatted date

2001-03-12 Thread John Murray
> if ($year % 4) = 0{$complete_months_contribution ++}; oops ... this will only get incremented if we are into march and it is a leap year, so we'll need to test if $monthnum > 2 as well: if ( ($year % 4 = 0 ) && ($monthnum > 2) ){$complete_months_contribution ++};

Re: [MacPerl-AnyPerl] input to formatted date

2001-03-12 Thread Bart Lateur
On Sun, 11 Mar 2001 10:52:02 +0100, allan wrote: >i have three html dropdown boxes containg intergers which a user can >select as input for a desired date like: > >11 03 01 > >i want to display the input above as: > >Sunday the 11th of march 2001 > >the one that causes the trouble is the weekday