This commit is contained in:
Daniel 2025-08-09 17:58:17 +08:00
parent c1682895ef
commit 96346a94ad
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
3 changed files with 10 additions and 5 deletions

View file

@ -26,6 +26,12 @@ import (
"github.com/88250/go-humanize"
)
func GetTodayStart() (ret time.Time) {
ret = time.Now()
ret = time.Date(ret.Year(), ret.Month(), ret.Day(), 0, 0, 0, 0, time.Local)
return
}
// Weekday returns the day of the week specified by date.
// Sunday=0, Monday=1, ..., Saturday=6.
func Weekday(date time.Time) int {