You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like the standard way to define ordered objects in Go (golang/go#50770 (comment)), and it is useful when we sort such objects by slices.SortFunc.
Describe the solution you'd like
I'll open a PR for this issue soon.
Describe alternatives you've considered
Of course, we can judge the order of civil objects by using exiting After and Before.
If there are opinions that it is unnecessary, I will respect them.
Additional context
The text was updated successfully, but these errors were encountered:
@shota3506 sorry, need to hold onto this for a little bit. We want to upgrade to Go 1.20 soon. Please reopen your PR after the reversion goes through and we will merge it as soon as we upgrade!
Is your feature request related to a problem? Please describe.
This proposal suggests adding
Compare
method to civil.Date, civil.Time and civil.DateTimeSome structs in the standard package have
Compare
method which returns a integer value of either -1, +1, or 0.https://pkg.go.dev/time#Time.Compare
https://pkg.go.dev/net/netip@master#Addr.Compare
It looks like the standard way to define ordered objects in Go (golang/go#50770 (comment)), and it is useful when we sort such objects by slices.SortFunc.
Describe the solution you'd like
I'll open a PR for this issue soon.
Describe alternatives you've considered
Of course, we can judge the order of civil objects by using exiting
After
andBefore
.If there are opinions that it is unnecessary, I will respect them.
Additional context
The text was updated successfully, but these errors were encountered: