summaryrefslogtreecommitdiff
path: root/tests/stringToTime.ur
blob: df7b7eed6a09da534820ed013e052413195c9871 (plain)
1
2
3
4
5
6
7
8
9
fun main () : transaction page =
    s <- source "";
    return <xml><body>
      <ctextbox source={s}/>
      <button onclick={v <- get s; alert (show (readError v : time))}/>
      <button onclick={v <- get s; case read v : option time of
                                       None => alert "Invalid"
                                     | Some tm => alert (show tm)}/>
    </body></xml>