Proper Field Validation Methods and other annoyances...
Björnke von Gierke
bvg at mac.com
Tue Aug 14 12:43:01 EDT 2007
On 14 Aug 2007, at 18:25, Len Morgan wrote:
> 1) Why does put "4" is a date return true? If this function doesn't
> actually work, why is it still available? I'd like to be able to have
> users enter a date without any kind of punctuation (i.e., 08142007)
> and be able to validate it as a valid date. The same applies to
> entering 1315 as a time (no colon).
Time & date handling is... complicated. This particular "feature" has
to do with the fact that rev knows a date format of "the seconds". As
that is just the number of seconds passed since some day in the
70-ties, every integer number evaluates to a date in rev.
Basically you have to do your own validation for any date or time that
is not known to be correct already, and "is a date" is extremely
official ChatRev page:
Chat with other RunRev developers:
go stack URL "http://homepage.mac.com/bvg/chatrev1.3.rev"
More information about the use-livecode