17 lines
306 B
Go
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
|
||
|
}
|