|
@@ -157,11 +157,11 @@ func (n NeckRingEstrusWarningSlice) ToPB(
|
|
|
func isIPeriod(periodKind pasturePb.MatingWindowPeriod_Kind, nowTime, optimumMatingStartTime, optimumMatingEndTime time.Time) bool {
|
|
func isIPeriod(periodKind pasturePb.MatingWindowPeriod_Kind, nowTime, optimumMatingStartTime, optimumMatingEndTime time.Time) bool {
|
|
|
switch periodKind {
|
|
switch periodKind {
|
|
|
case pasturePb.MatingWindowPeriod_Front:
|
|
case pasturePb.MatingWindowPeriod_Front:
|
|
|
- return nowTime.Before(optimumMatingStartTime)
|
|
|
|
|
|
|
+ return !nowTime.Before(optimumMatingStartTime)
|
|
|
case pasturePb.MatingWindowPeriod_Middle:
|
|
case pasturePb.MatingWindowPeriod_Middle:
|
|
|
- return nowTime.After(optimumMatingStartTime) && nowTime.Before(optimumMatingEndTime)
|
|
|
|
|
|
|
+ return !(nowTime.After(optimumMatingStartTime) && nowTime.Before(optimumMatingEndTime))
|
|
|
case pasturePb.MatingWindowPeriod_Behind:
|
|
case pasturePb.MatingWindowPeriod_Behind:
|
|
|
- return nowTime.After(optimumMatingEndTime)
|
|
|
|
|
|
|
+ return !(nowTime.After(optimumMatingEndTime))
|
|
|
default:
|
|
default:
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|