@@ -34,12 +34,12 @@ const (
34
34
// Max is the maximum TimeOfDay value (1 second before midnight)
35
35
Max = Time2400
36
36
37
- microsecondsPerSecond = 1e6
38
- microsecondsPerMinute = 60 * microsecondsPerSecond
39
- microsecondsPerHour = 60 * microsecondsPerMinute
40
- microsecondsPerDay = 24 * microsecondsPerHour
41
- nanosPerMicro = 1000
42
- secondsPerDay = 24 * 60 * 60
37
+ microsecondsPerSecond int64 = 1e6
38
+ microsecondsPerMinute = 60 * microsecondsPerSecond
39
+ microsecondsPerHour = 60 * microsecondsPerMinute
40
+ microsecondsPerDay = 24 * microsecondsPerHour
41
+ nanosPerMicro = 1000
42
+ secondsPerDay = 24 * 60 * 60
43
43
)
44
44
45
45
// New creates a TimeOfDay representing the specified time.
@@ -147,19 +147,19 @@ func (t TimeOfDay) Hour() int {
147
147
if t == Time2400 {
148
148
return 24
149
149
}
150
- return int (int64 (t )% microsecondsPerDay ) / microsecondsPerHour
150
+ return int (int64 (t ) % microsecondsPerDay / microsecondsPerHour )
151
151
}
152
152
153
153
// Minute returns the minute offset within the hour specified by t, in the
154
154
// range [0, 59].
155
155
func (t TimeOfDay ) Minute () int {
156
- return int (int64 (t )% microsecondsPerHour ) / microsecondsPerMinute
156
+ return int (int64 (t ) % microsecondsPerHour / microsecondsPerMinute )
157
157
}
158
158
159
159
// Second returns the second offset within the minute specified by t, in the
160
160
// range [0, 59].
161
161
func (t TimeOfDay ) Second () int {
162
- return int (int64 (t )% microsecondsPerMinute ) / microsecondsPerSecond
162
+ return int (int64 (t ) % microsecondsPerMinute / microsecondsPerSecond )
163
163
}
164
164
165
165
// Microsecond returns the microsecond offset within the second specified by t,
0 commit comments