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