Documentation ¶
Index ¶
- Constants
- func Difference(t1 TimeOfDay, t2 TimeOfDay) duration.Duration
- type TimeOfDay
- func (t TimeOfDay) Add(d duration.Duration) TimeOfDay
- func (t TimeOfDay) Hour() int
- func (t TimeOfDay) Microsecond() int
- func (t TimeOfDay) Minute() int
- func (t TimeOfDay) Round(precision time.Duration) TimeOfDay
- func (t TimeOfDay) Second() int
- func (t TimeOfDay) String() string
- func (t TimeOfDay) ToTime() time.Time
Constants ¶
View Source
const ( // Min is the minimum TimeOfDay value (midnight). Min = TimeOfDay(0) // Max is the maximum TimeOfDay value (1 second before midnight) Max = TimeOfDay(microsecondsPerDay - 1) // Time2400 is a special value to represent the 24:00 input time Time2400 = TimeOfDay(microsecondsPerDay) )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type TimeOfDay ¶
type TimeOfDay int64
TimeOfDay represents a time of day (no date), stored as microseconds since midnight.
func FromInt ¶
FromInt constructs a TimeOfDay from an int64, representing microseconds since midnight. Inputs outside the range [0, microsecondsPerDay) are modded as appropriate.
func (TimeOfDay) Microsecond ¶
Microsecond returns the microsecond offset within the second specified by t, in the range [0, 999999].
func (TimeOfDay) Minute ¶
Minute returns the minute offset within the hour specified by t, in the range [0, 59].
Click to show internal directories.
Click to hide internal directories.