view tests/stringToTime.ur @ 2229:54884b28b6c6

Merge.
author Ziv Scully <ziv@mit.edu>
date Tue, 07 Apr 2015 17:26:53 -0400
parents 252e05bf199d
children
line wrap: on
line source
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>