From a376c57e83a99f8e8fde297335caa85215e7aead Mon Sep 17 00:00:00 2001 From: Shuo Date: Sun, 1 Mar 2020 10:31:34 +0800 Subject: [PATCH] time: use yday --- src/time/time.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/time/time.go b/src/time/time.go index ce7d3b51d0..bf53243c8d 100644 --- a/src/time/time.go +++ b/src/time/time.go @@ -553,8 +553,8 @@ func (t Time) ISOWeek() (year, week int) { } // find the Thursday of the calendar week abs += uint64(d) * secondsPerDay - year, _, _, week = absDate(abs, false) - return year, week/7 + 1 + year, _, _, yday := absDate(abs, false) + return year, yday/7 + 1 } // Clock returns the hour, minute, and second within the day specified by t.