Преглед изворни кода

Merge remote-tracking branch 'origin/debug' into debug

Roc пре 4 месеци
родитељ
комит
6b92bd03f5
1 измењених фајлова са 5 додато и 1 уклоњено
  1. 5 1
      utils/common.go

+ 5 - 1
utils/common.go

@@ -1765,7 +1765,11 @@ func GetDateByDateTypeV2(dateType int, tmpStartDate, tmpEndDate string, startYea
 			startDate = startDate + "-01"
 		}
 		if strings.Count(endDate, "-") == 1 {
-			endDate = endDate + "-01"
+			endTime, err := time.Parse(FormatYearMonthDate, endDate)
+			if err != nil {
+				return
+			}
+			endDate = endTime.AddDate(0, 1, -1).Format(FormatDate)
 		}
 	}