Files
valera/internal/modules/times/times.go
T
VLADIMIR 3f9447f0b8
continuous-integration/drone/push Build is passing
update calories message
2023-04-15 19:13:10 +07:00

17 lines
306 B
Go

package times
import "time"
func GetStartDay() time.Time {
loc, _ := time.LoadLocation("Asia/Novosibirsk")
t := time.Now().In(loc)
t = time.Date(t.Year(), t.Month(), t.Day(), 0, 0, 0, 0, loc)
return t
}
func GetStartWeek() time.Time {
t := GetStartDay()
t = t.Add(-6 * 24 * time.Hour)
return t
}