gitlab.com/evatix-go/core@v1.3.55/corecmp/Time.go (about) 1 package corecmp 2 3 import ( 4 "time" 5 6 "gitlab.com/evatix-go/core/corecomparator" 7 ) 8 9 func Time(left, right time.Time) corecomparator.Compare { 10 if left.Before(right) { 11 return corecomparator.LeftLess 12 } else if left.After(right) { 13 return corecomparator.LeftGreater 14 } else if left.Equal(right) { 15 return corecomparator.Equal 16 } 17 18 return corecomparator.NotEqual 19 }