|
@@ -431,3 +431,12 @@ func IsJdSb(period string) bool {
|
|
|
func GetMonthEnd(t time.Time) time.Time {
|
|
|
return t.AddDate(0, 1, -t.Day())
|
|
|
}
|
|
|
+
|
|
|
+func GetCurrentDate1() string {
|
|
|
+ tm := time.Unix(time.Now().Unix(), 0)
|
|
|
+ currentYear, currentMonth, _ := tm.Date()
|
|
|
+ currentLocation := tm.Location()
|
|
|
+ firstOfMonth := time.Date(currentYear, currentMonth, 10, 0, 0, 0, 0, currentLocation)
|
|
|
+ period := firstOfMonth.AddDate(0, 0, 0).Format("2006-01") // 当前日期
|
|
|
+ return period
|
|
|
+}
|