mirror of
https://github.com/Luzifer/go-holidays.git
synced 2024-12-25 13:21:17 +00:00
Fix: Sorting now is a string comparison
This commit is contained in:
parent
ec9779f118
commit
494749a578
1 changed files with 1 additions and 1 deletions
|
@ -28,7 +28,7 @@ type Holiday struct {
|
|||
type holidays []Holiday
|
||||
|
||||
func (h holidays) Len() int { return len(h) }
|
||||
func (h holidays) Less(i, j int) bool { return h[i].Date.Before(h[j].Date) }
|
||||
func (h holidays) Less(i, j int) bool { return h[i].Date < h[j].Date }
|
||||
func (h holidays) Swap(i, j int) { h[i], h[j] = h[j], h[i] }
|
||||
|
||||
// GetHolidays returns the holidays for the given ISO 3166-2 countryCode and year
|
||||
|
|
Loading…
Reference in a new issue