summaryrefslogtreecommitdiff
path: root/assignment-7/DateExtensions.dcl
diff options
context:
space:
mode:
authorCamil Staps2017-10-29 17:03:54 +0100
committerCamil Staps2017-10-29 17:04:00 +0100
commitecb18466abbab1aab1b3b2b8a22258003dc99d58 (patch)
treef64a083321dd3e58a8a208ba7a6e7dcbe13aa29b /assignment-7/DateExtensions.dcl
parentStart with assignment 7 (diff)
Add showAppointments tryouts with SVG, nicer makeAppointment, proposeAppointment stub
Diffstat (limited to 'assignment-7/DateExtensions.dcl')
-rw-r--r--assignment-7/DateExtensions.dcl15
1 files changed, 15 insertions, 0 deletions
diff --git a/assignment-7/DateExtensions.dcl b/assignment-7/DateExtensions.dcl
new file mode 100644
index 0000000..c7eacec
--- /dev/null
+++ b/assignment-7/DateExtensions.dcl
@@ -0,0 +1,15 @@
+definition module DateExtensions
+
+import iTasks.Extensions.DateTime
+
+:: Day = Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday
+
+derive class iTask Day
+instance toString Day
+
+nextHour :: DateTime -> DateTime
+nextDay :: (Date -> Date)
+
+dayOfWeek :: Date -> Day
+
+previous :: Day Date -> Date