Skip to content

Commit

Permalink
Order daily summary view (#177)
Browse files Browse the repository at this point in the history
  • Loading branch information
larkox authored Aug 5, 2020
1 parent 61581f3 commit c0d915f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/mscalendar/views/calendar.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ func RenderCalendarView(events []*remote.Event, timeZone string) (string, error)
}
}

sort.Slice(events, func(i, j int) bool {
return events[i].Start.Time().Before(events[j].Start.Time())
})

resp := "Times are shown in " + events[0].Start.TimeZone
for _, group := range groupEventsByDate(events) {
resp += "\n" + group[0].Start.Time().Format("Monday January 02") + "\n\n"
Expand Down

0 comments on commit c0d915f

Please sign in to comment.