|
@@ -8,7 +8,6 @@ import (
|
|
|
"encoding/hex"
|
|
|
"encoding/json"
|
|
|
"fmt"
|
|
|
- "github.com/araddon/dateparse"
|
|
|
"github.com/shopspring/decimal"
|
|
|
"image"
|
|
|
"image/png"
|
|
@@ -1204,11 +1203,18 @@ func GetEdbRefreshEndDate(endDate string) string {
|
|
|
}
|
|
|
|
|
|
func DealExcelDate(date string) (newDate time.Time, err error) {
|
|
|
- newDate, err = dateparse.ParseAny(date)
|
|
|
+ /*newDate, err = dateparse.ParseAny(date)
|
|
|
if err != nil {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- newDate = time.Date(newDate.Year(), newDate.Month(), newDate.Day(), 0, 0, 0, 0, time.Local)
|
|
|
+ newDate = time.Date(newDate.Year(), newDate.Month(), newDate.Day(), 0, 0, 0, 0, time.Local)*/
|
|
|
+ if strings.Contains(date, "/") {
|
|
|
+ newDate, err = time.ParseInLocation("2006/01/02", date, time.Local)
|
|
|
+ return
|
|
|
+ } else {
|
|
|
+ newDate, err = time.ParseInLocation(FormatDate, date, time.Local)
|
|
|
+ return
|
|
|
+ }
|
|
|
return
|
|
|
}
|