Re: [MacPerl-AnyPerl] input to formatted date

2001-03-13 Thread allan
thanks bart, couldn't be more brilliant! allan > > 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 t

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

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

Re: [MacPerl-AnyPerl] input to formatted date

2001-03-11 Thread John Murray
PS - you have to get the position in the @monthdays array right - didn't work tis out - Original Message - From: Scott R. Godin <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, March 11, 2001 9:04 PM Subject: Re: [MacPerl-AnyPerl] input to formatted date > on

Re: [MacPerl-AnyPerl] input to formatted date

2001-03-11 Thread Scott R. Godin
on 03/11/2001 04:52 AM, allan at [EMAIL PROTECTED] wrote: by the way, the macperl.org list is soon to be defunct, having been replaced by the same list @perl.org. I forwarded my reply to you to the [EMAIL PROTECTED] list. -- Scott R. Godin| e-mail : [EMAIL PROTECTED] Laughing Drago

Re: [MacPerl-AnyPerl] input to formatted date

2001-03-11 Thread Scott R. Godin
on 03/11/2001 04:52 AM, allan at [EMAIL PROTECTED] wrote: > hi > > 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

[MacPerl-AnyPerl] input to formatted date

2001-03-11 Thread allan
hi 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. so my question is how can i extract/calculate the corr