<pre>function testDate when,notBefore,notAfter  put true into valid  repeat with P = 1 to 8    if char P of when is not in "/0123456789-" then put false into valid  end repeat  if valid then    if notBefore is not empty and when < notBefore then put false into valid    if notAfter is not empty and when > notAfter then put false into valid  end if  return validend testDate</pre>