|
@@ -268,11 +268,18 @@ func getPredictEdbDayList(startDate, endDate time.Time, frequency string) (dayLi
|
|
|
case "月度":
|
|
|
for currDate := startDate; currDate.Before(endDate) || currDate.Equal(endDate); {
|
|
|
currDate = time.Date(currDate.Year(), currDate.Month(), 1, 0, 0, 0, 0, time.Now().Location()).AddDate(0, 1, -1)
|
|
|
- if !currDate.After(endDate) {
|
|
|
+ if !currDate.After(endDate) && !currDate.Equal(startDate) {
|
|
|
dayList = append(dayList, currDate)
|
|
|
}
|
|
|
currDate = currDate.AddDate(0, 0, 1)
|
|
|
}
|
|
|
+ case "年度":
|
|
|
+ for currDate := startDate; currDate.Before(endDate) || currDate.Equal(endDate); {
|
|
|
+ currDate = time.Date(currDate.Year()+1, 12, 31, 0, 0, 0, 0, time.Now().Location())
|
|
|
+ if !currDate.After(endDate) && !currDate.Equal(startDate) {
|
|
|
+ dayList = append(dayList, currDate)
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
return
|
|
|
}
|