[Javascript] chopping up a string?

Paul McGuire pmcguire at cguk.co.uk
Mon Nov 17 09:32:45 CST 2003


In my job deadlines come first style comes second. Not ideal in a perfect
world but JS is not my speciality, as I'm sure will be pointed out! Thanks
for looking over it and yes I agree with your getYear comment. I will use
this instead.

Paul


----- Original Message ----- 
From: "Walter Torres" <walter at torres.ws>
To: "[JavaScript List]" <javascript at LaTech.edu>
Sent: Monday, November 17, 2003 3:27 PM
Subject: RE: [Javascript] chopping up a string?


> > -----Original Message-----
> > From: javascript-bounces at LaTech.edu
> > [mailto:javascript-bounces at LaTech.edu]On Behalf Of Paul McGuire
> > Sent: Monday, November 17, 2003 9:12 AM
> > To: [JavaScript List]
> > Subject: Re: [Javascript] chopping up a string?
> >
> >
> > It is as the field looses focus I have been working on this all day and
my
> > solution (which is still theory) is
>
> your theory works as well as mine.
>
> The only thing I would change...
>
> > i.e
> >
> > current date is 17/11/03
> >
> > oursatestring is 17/11/
> >
> > strip the 6 characters off current date to leave 03
> >
> > 17/11/ + 03
>
> Why waste energy stripping the year off?
>
> just use...   getYear()
>
> This will return a 2 digit year for you.
>
>
>
> > and there you have it the date in a variable created from the
> > numbers added into the reqdate box.
>
> Yep. Works fine.
>
> Folks can quibble about style, but what you have sounds fine to me.
>
> I image others will chime in with their version.
>
> Good luck.
>
> Walter
>
>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript




More information about the Javascript mailing list