annotate datebox.urs @ 17:2947170fcfd6

Fix sign error in clock skew correction
author Adam Chlipala <adam@chlipala.net>
date Sun, 21 Aug 2011 11:27:41 -0400
parents 8300d5f0dc19
children 3a303df9ae92
rev   line source
adam@2 1 type t
kkallio@14 2 (* The type of dateboxes, which are input elements
kkallio@14 3 * allowing the user to select a date from a popup
kkallio@14 4 * calendar. *)
adam@2 5
adam@4 6 type date = {Year : int, Month : int, Day : int}
kkallio@14 7 val date_eq : eq date
adam@5 8 val date_ord : ord date
adam@5 9 val time : date -> time
kkallio@12 10 val date : time -> date
kkallio@14 11 (* Type of dates and some useful utility functions. *)
adam@4 12
adam@4 13 val create : time -> transaction t
kkallio@14 14 (* Get a datebox initially set to the given time. *)
kkallio@14 15
adam@15 16 val onChange : t -> (date -> transaction {}) -> transaction {}
kkallio@14 17 (* Add an action to be run when the date changes. *)
kkallio@14 18
adam@15 19 val set : t -> date -> transaction {}
kkallio@14 20 (* Call this to change the selected date. *)
kkallio@14 21
kkallio@14 22 val value : t -> signal date
kkallio@14 23 (* Extract the current date value. *)
kkallio@14 24
adam@2 25 val render : t -> xbody
kkallio@14 26 (* Draws the datebox as a piece of xml. *)