check if an item is a date

Frank D. Engel, Jr. fde101 at fjrhome.net
Thu Mar 17 12:15:31 EST 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Want to be even more flexible?  Try this:

convert myvalue to long date
if it is "invalid date" then
   answer "That date is invalid!"
else
   put it into myvalue
end if

This will convert other recognized date formats into the long date 
format and replace the original data with that, complaining if the 
input date is invalid.

You can replace 'long date' with 'system long date' to force use of the 
OS's defined long date format, but note that I seem to have come across 
a problem with this that sticks a leading zero on the day number, even 
though my system prefs do not call for one.

You can also replace 'long' with 'short', or whatever...


On Mar 17, 2005, at 11:52 AM, Rob Cozens wrote:

> Jacque, et al,
>
>> I see seconds & fixed notations (yours + Julian + whatever) as 
>> non-sequitur:
>
> To put it another way: For user input validation, a date is valid ONLY 
> if it conforms to the computer's current system date format.
>
> Rob Cozens, Staff Conservator
> Mendonoma Marine Life Conservancy
>
> "Fishermen are living off capital,consuming the resource that should 
> yield their catch.
>
> The Economist, March 1994
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
- -----------------------------------------------------------
Frank D. Engel, Jr.  <fde101 at fjrhome.net>

$ ln -s /usr/share/kjvbible /usr/manual
$ true | cat /usr/manual | grep "John 3:16"
John 3:16 For God so loved the world, that he gave his only begotten 
Son, that whosoever believeth in him should not perish, but have 
everlasting life.
$
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFCObs07aqtWrR9cZoRAiQNAJsFDNxEkFOWbY9CZB/MtHoCKw7mQgCfQTZl
u7ZtsnLuPbXfihJUyJg1FQA=
=U3b6
-----END PGP SIGNATURE-----



___________________________________________________________
$0 Web Hosting with up to 120MB web space, 1000 MB Transfer
10 Personalized POP and Web E-mail Accounts, and much more.
Signup at www.doteasy.com



More information about the Use-livecode mailing list