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

Fix start of year computation.

Add shortcut to get lifetime statistics.
This commit is contained in:
Ferdinand Mütsch
2020-01-09 00:19:24 +01:00
parent 4ae53746c3
commit d583dd312b
3 changed files with 19 additions and 10 deletions

View File

@@ -20,7 +20,7 @@ func StartOfMonth() time.Time {
func StartOfYear() time.Time {
ref := time.Now()
return time.Date(ref.Year(), 0, 0, 0, 0, 0, 0, ref.Location())
return time.Date(ref.Year(), time.January, 0, 0, 0, 0, 0, ref.Location())
}
// https://stackoverflow.com/a/18632496