I have this code which takes the values as 1hours/2hours or 3am /4pm, or 1week, 2week, 24hours etc, in time and date formats, and I have this if condition which validates for semantics :
if {[catch {clock scan [getValue]} errMsg]} \
{
handleError -errMsg \
"Invalid date-time format: $errMsg."
}
So any other alternative for this which takes less time/uses CPU to validate the same?