parcoursmob/utils/sorting/events.go

12 lines
373 B
Go
Raw Normal View History

2022-11-01 10:32:13 +00:00
package sorting
import (
agendastorage "git.coopgo.io/coopgo-platform/agenda/storage"
)
type EventsByStartdate []agendastorage.Event
func (e EventsByStartdate) Len() int { return len(e) }
func (e EventsByStartdate) Less(i, j int) bool { return e[i].Startdate.Before(e[j].Startdate) }
func (e EventsByStartdate) Swap(i, j int) { e[i], e[j] = e[j], e[i] }