Mercurial > urweb
annotate lib/ur/datetime.urs @ 2303:42079884e34a
Add read locks around time read in store.
author | Ziv Scully <ziv@mit.edu> |
---|---|
date | Fri, 20 Nov 2015 11:51:14 -0500 |
parents | 50322ba22972 |
children |
rev | line source |
---|---|
phurst@1973 | 1 datatype day_of_week = Sunday | Monday | Tuesday | Wednesday | Thursday | |
phurst@1973 | 2 Friday | Saturday |
phurst@1973 | 3 |
phurst@1974 | 4 datatype month = January | February | March | April | May | June | July | |
phurst@1974 | 5 August | September | October | November | December |
phurst@1974 | 6 |
phurst@1974 | 7 |
phurst@1975 | 8 type t = { |
phurst@1974 | 9 Year : int, |
phurst@1974 | 10 Month : month, |
phurst@1974 | 11 Day : int, |
phurst@1974 | 12 Hour : int, |
phurst@1974 | 13 Minute : int, |
phurst@1974 | 14 Second : int |
phurst@1974 | 15 } |
phurst@1974 | 16 |
phurst@1977 | 17 val ord_datetime : ord t |
phurst@1977 | 18 |
phurst@1974 | 19 val show_day_of_week : show day_of_week |
phurst@1974 | 20 val show_month : show month |
phurst@1974 | 21 val eq_day_of_week : eq day_of_week |
phurst@1974 | 22 val eq_month : eq month |
phurst@1974 | 23 val dayOfWeekToInt : day_of_week -> int |
phurst@1974 | 24 val intToDayOfWeek : int -> day_of_week |
phurst@1974 | 25 val monthToInt : month -> int |
phurst@1974 | 26 val intToMonth : int -> month |
phurst@1973 | 27 |
phurst@1975 | 28 val toTime : t -> time |
phurst@1975 | 29 val fromTime : time -> t |
phurst@1975 | 30 val format : string -> t -> string |
phurst@1975 | 31 val dayOfWeek : t -> day_of_week |
phurst@1975 | 32 val now : transaction t |
phurst@1977 | 33 val normalize : t -> t |
phurst@1977 | 34 |
phurst@1977 | 35 val addSeconds : int -> t -> t |
phurst@1977 | 36 val addMinutes : int -> t -> t |
phurst@1977 | 37 val addHours : int -> t -> t |
phurst@1977 | 38 val addDays : int -> t -> t |