refactor(schedule-week): minor TimeSlot documentation refactor
This commit is contained in:
parent
2baf76f138
commit
a025e57817
@ -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
|
||||
|
||||
Reference in New Issue
Block a user