Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2025-12-29 09:19:24 +08:00
parent f5167ae895
commit 3c00f5a3d1
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 13 additions and 2 deletions

View file

@ -26,6 +26,11 @@ import (
"github.com/88250/go-humanize"
)
func IsTimeStr(str string) bool {
_, err := time.Parse("20060102150405", str)
return nil == err
}
func GetTodayStart() (ret time.Time) {
ret = time.Now()
ret = time.Date(ret.Year(), ret.Month(), ret.Day(), 0, 0, 0, 0, time.Local)