Date Validation with TCL

Clovertech Forums Read Only Archives Cloverleaf Tcl Library Date Validation with TCL

  • Creator
    Topic
  • #50715
    Marcus de Leon
    Participant

      Hi,

      I’m trying to validate a date with TCL using the clock scan function. See code below:

      Code:


      set str “20050101T000000”

      if {[catch {clock scan $str} err]} {
         echo “Invalid Date”
      }

      This works fine however if I use a date that is less than January 1, 1902 then it fails. For example if the date passed in was 19000101T000000, then this would not work. Does anybody know how to get around this issue?

    Viewing 0 reply threads
    • Author
      Replies
      • #67225
        Charlie Bursell
        Participant

          This is a documented bug with the clock command.  If you search comp.lang.tcl you will find noise on it

      Viewing 0 reply threads
      • The forum ‘Tcl Library’ is closed to new topics and replies.