From a025e578174ed89bb1bd8a1017f36636620afc6b Mon Sep 17 00:00:00 2001 From: Sarah Vaupel <> Date: Mon, 24 Aug 2020 19:42:15 +0200 Subject: [PATCH] refactor(schedule-week): minor TimeSlot documentation refactor --- src/Utils/Schedule/Week/TimeSlot.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Utils/Schedule/Week/TimeSlot.hs b/src/Utils/Schedule/Week/TimeSlot.hs index eb811c7fb..8ed419948 100644 --- a/src/Utils/Schedule/Week/TimeSlot.hs +++ b/src/Utils/Schedule/Week/TimeSlot.hs @@ -28,11 +28,11 @@ timeSlot h = TimeSlot{..} where tsTo = TimeOfDay (h+slotStep) 0 0 --- | Check whether a given time of day lies within a given time slot +-- | Check whether a given time of day lies within a given TimeSlot isInTimeSlot :: TimeOfDay -> TimeSlot -> Bool isInTimeSlot time TimeSlot{..} = tsFrom <= time && time < tsTo --- | Get the successor of a time slot +-- | Get the successor of a TimeSlot nextTimeSlot :: TimeSlot -> TimeSlot nextTimeSlot TimeSlot{tsTo=tsFrom} = let tsTo = TimeOfDay (todHour tsFrom + slotStep) 0 0 in TimeSlot{..} @@ -43,6 +43,6 @@ timeSlotToUTCTime tz day TimeSlot{..} = UTCTime{..} where utctDayTime = timeOfDayToTime slotTimeOfDay (slotDayOffset, slotTimeOfDay) = localToUTCTimeOfDay tz tsFrom --- | Format a given TimeSlot t as time range from t until the next TimeSlot +-- | Format a given TimeSlot as time range formatTimeSlotW :: TimeSlot -> Widget formatTimeSlotW TimeSlot{..} = formatTimeRangeW SelFormatTime tsFrom $ Just tsTo