check if an item is a date
rcozens at pon.net
Thu Mar 17 11:46:49 EST 2005
Jacque, et al,
>If you can think of a bullet-proof way to evaluate dates in all languages,
>with all types of delimiters, with all types of system date formats,
>without mistaking seconds or fixed-length notations as non-dates, you
>might consider submitting a feature request with your suggestions.
Serendipity Library could do it all...up to "without mistaking seconds or
fixed length notations" by expanding the logic to accmodate month names as
well as numbers.
And, since the issue is, I believe, validating user input, I see seconds &
fixed notations (yours + Julian + whatever) as non-sequitur: they would
arise during import of data or in data transferred from another computer or
online device. In those cases, the data should (a) be validated at the
source or (b) require validation handlers specific to the data
specifications (eg: Flexware supports a five-character Julian date format
that includes the full four-digit year).
"The way to destroy the power of the Corporate State
is to live differently now."
-- Charles Reich, The Greening of America
More information about the Use-livecode