mirror of
https://github.com/golang/go
synced 2024-11-17 17:14:45 -07:00
time: use yday
This commit is contained in:
parent
0902b6f4f7
commit
a376c57e83
@ -553,8 +553,8 @@ func (t Time) ISOWeek() (year, week int) {
|
|||||||
}
|
}
|
||||||
// find the Thursday of the calendar week
|
// find the Thursday of the calendar week
|
||||||
abs += uint64(d) * secondsPerDay
|
abs += uint64(d) * secondsPerDay
|
||||||
year, _, _, week = absDate(abs, false)
|
year, _, _, yday := absDate(abs, false)
|
||||||
return year, week/7 + 1
|
return year, yday/7 + 1
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clock returns the hour, minute, and second within the day specified by t.
|
// Clock returns the hour, minute, and second within the day specified by t.
|
||||||
|
Loading…
Reference in New Issue
Block a user