1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

Properly redraw charts.

Add pre-defined interval for today.
Fix week interval.
This commit is contained in:
Ferdinand Muetsch
2019-05-23 08:14:32 +02:00
parent e23e7520d0
commit 899b2fff64
3 changed files with 25 additions and 8 deletions

View File

@ -9,7 +9,8 @@ func StartOfDay() time.Time {
func StartOfWeek() time.Time {
ref := time.Now()
return firstDayOfISOWeek(ref.Year(), ref.Day(), ref.Location())
year, week := ref.ISOWeek()
return firstDayOfISOWeek(year, week, ref.Location())
}
func StartOfMonth() time.Time {