|
@@ -287,7 +287,7 @@ func GetRjzFrequencyDays(currDate time.Time, frequency string) (days int, err er
|
|
|
} else {
|
|
|
// 下旬,多种可能,最大天数可能存在8天,9天,10天,11天,
|
|
|
currT := time.Date(currDate.Year(), currDate.Month(), 20, 0, 0, 0, 0, time.Local)
|
|
|
- nextT := time.Date(currDate.Year(), currDate.Month()+1, 1, 0, 0, 0, 0, time.Local)
|
|
|
+ nextT := time.Date(currDate.Year(), currDate.Month()+1, 1, 0, 0, 0, 0, time.Local).AddDate(0, 0, -1)
|
|
|
days = utils.GetTimeSubDay(currT, nextT)
|
|
|
}
|
|
|
case "月度":
|
|
@@ -331,7 +331,6 @@ func rjzDiv(a float64, b int) string {
|
|
|
af := decimal.NewFromFloat(a)
|
|
|
bf := decimal.NewFromFloat(float64(b))
|
|
|
val, _ := af.Div(bf).Float64()
|
|
|
- val = val - 1
|
|
|
valStr = decimal.NewFromFloat(val).RoundCeil(4).String()
|
|
|
} else {
|
|
|
valStr = "0"
|