mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-02 03:40:27 +08:00
13 lines
305 B
Go
13 lines
305 B
Go
// Copyright 2023 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cloud .
|
|
|
|
package dateutils
|
|
|
|
// SplitYmd 分隔Ymd格式的日期
|
|
// Ymd => Y-m-d
|
|
func SplitYmd(day string) string {
|
|
if len(day) != 8 {
|
|
return day
|
|
}
|
|
return day[:4] + "-" + day[4:6] + "-" + day[6:]
|
|
}
|