Mercurial > urweb
comparison lib/ur/datetime.urs @ 1988:abb6981a2c4c
Merge with small clean-ups
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Tue, 18 Feb 2014 07:07:01 -0500 |
parents | 50322ba22972 |
children |
comparison
equal
deleted
inserted
replaced
1970:6bea98c7f736 | 1988:abb6981a2c4c |
---|---|
1 datatype day_of_week = Sunday | Monday | Tuesday | Wednesday | Thursday | | |
2 Friday | Saturday | |
3 | |
4 datatype month = January | February | March | April | May | June | July | | |
5 August | September | October | November | December | |
6 | |
7 | |
8 type t = { | |
9 Year : int, | |
10 Month : month, | |
11 Day : int, | |
12 Hour : int, | |
13 Minute : int, | |
14 Second : int | |
15 } | |
16 | |
17 val ord_datetime : ord t | |
18 | |
19 val show_day_of_week : show day_of_week | |
20 val show_month : show month | |
21 val eq_day_of_week : eq day_of_week | |
22 val eq_month : eq month | |
23 val dayOfWeekToInt : day_of_week -> int | |
24 val intToDayOfWeek : int -> day_of_week | |
25 val monthToInt : month -> int | |
26 val intToMonth : int -> month | |
27 | |
28 val toTime : t -> time | |
29 val fromTime : time -> t | |
30 val format : string -> t -> string | |
31 val dayOfWeek : t -> day_of_week | |
32 val now : transaction t | |
33 val normalize : t -> t | |
34 | |
35 val addSeconds : int -> t -> t | |
36 val addMinutes : int -> t -> t | |
37 val addHours : int -> t -> t | |
38 val addDays : int -> t -> t |