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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user