This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user