jupiter icon indicating copy to clipboard operation
jupiter copied to clipboard

[BUG] xtime包下time.go的 EndOfDay EndOfHour 方法

Open fsiisx opened this issue 6 years ago • 0 comments

Issue Description

Type: bug report

Describe what happened

Describe what you expected to happen

func (t *Time) EndOfDay() *Time { y, m, d := t.Date() return &Time{time.Date(y, m, d, 23, 23, 59, int(time.Second-time.Nanosecond), t.Location())} }

第二个23应该为59吧。

func (t *Time) EndOfHour() *Time { y, m, d := t.Date() return &Time{time.Date(y, m, d, t.Hour(), 23, 59, int(time.Second-time.Nanosecond), t.Location())} }

第一个23应该为59吧。

How to reproduce it (as minimally and precisely as possible)

Tell us your environment

Anything else we need to know?

fsiisx avatar Jun 03 '20 03:06 fsiisx