diff options
Diffstat (limited to 'lib/ur/datetime.ur')
-rw-r--r-- | lib/ur/datetime.ur | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/ur/datetime.ur b/lib/ur/datetime.ur index 56c29724..a633dc83 100644 --- a/lib/ur/datetime.ur +++ b/lib/ur/datetime.ur @@ -7,6 +7,18 @@ type datetime = { Second : int } +datatype day_of_week = Sunday | Monday | Tuesday | Wednesday | Thursday | + Friday | Saturday + +val show = mkShow (fn dow => case dow of + Sunday => "Sunday" + | Monday => "Monday" + | Tuesday => "Tuesday" + | Wednesday => "Wednesday" + | Thursday => "Thursday" + | Friday => "Friday" + | Saturday => "Saturday") + fun toTime dt : time = fromDatetime dt.Year dt.Month dt.Day dt.Hour dt.Minute dt.Second |