refactor(schedule-week): use dayNowOffset
This commit is contained in:
parent
798a0811b7
commit
67302a5dd1
@ -111,7 +111,7 @@ weekSchedule uid dayOffset = do
|
||||
-- TODO: Internationalize default week start (and/or make configurable)
|
||||
-- TODO: auto-hide saturday and sunday (if there are no events scheduled)?
|
||||
week :: [Day]
|
||||
week = go $ fromMaybe 0 dayOffset `addDays` utctDay now
|
||||
week = go dayNowOffset
|
||||
where go day
|
||||
| dayOfWeek day == firstDay = [day .. toEnum (fromEnum day + 6)]
|
||||
| otherwise = go $ pred day
|
||||
|
||||
Reference in New Issue
Block a user