[Javascript] InStr

Peter Brunone peter at brunone.com
Fri Aug 6 08:32:42 CDT 2004


Paul,

    Just use myString.IndexOf("Sun") , which will yield an integer
position of "Sun" within myString.

Cheers,

Peter

-----Original Message-----
From: javascript-bounces at LaTech.edu
[mailto:javascript-bounces at LaTech.edu] On Behalf Of Paul McGuire


Does inStr or similar exist in Javascript and how is it used. I am
writing a date add function that takes a date adds the delivery time to
it then checks to make sure its not a weekend. I wanting to do this by
formatting the date to the SUN 21 JUNE type format and then using a
InStr type function to pick out the "Sun" if it finds it I add another
day to the delivery time as weekend delivery is not allowed.

Paul





More information about the Javascript mailing list