is a date

J. Landman Gay jacque at hyperactivesw.com
Sun Oct 15 14:44:51 EDT 2017


On 10/15/17 5:10 AM, Yves COPPE via use-livecode wrote:
> I hope this works for any date format
...
> 
> if matchtext(textToSearch,"(\d{1,2})/(\d{1,2})/(\d{2,4})",theDay,TheMonth,TheYear) is true then

Yes, it seems to work with any numeric date now. I also like Ken Ray's 
solution which lets the engine do the conversion and checks for errors, 
since that works with long date formats. The advantage to your solution 
is that it does not recognize a single integer as a date, which could be 
important in some cases. I think there is a use for both functions 
depending on the script context.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the Use-livecode mailing list