From 07672be5d71db5027e39cb057f00f7ffa266ff3b Mon Sep 17 00:00:00 2001 From: Samuele Musiani Date: Sun, 26 Nov 2023 19:33:15 +0100 Subject: [PATCH] fix sorting for /lezioni* --- commands/uni.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/uni.go b/commands/uni.go index d860b67..37557ce 100644 --- a/commands/uni.go +++ b/commands/uni.go @@ -61,7 +61,7 @@ func GetTimeTable(courseType, courseName string, year int, day time.Time) (strin // Sort the events by start time slices.SortFunc(events, func(a, b timetable.Event) int { - return int(b.Start.Time.Sub(a.Start.Time).Nanoseconds()) + return int(a.Start.Time.Sub(b.Start.Time).Nanoseconds()) }) b := strings.Builder{}