Documentation
¶
Overview ¶
Package timeutil includes helpers for working with timestamps.
Index ¶
- Constants
- func DiffHours(t1, t2 time.Time) (hours int)
- func FromMilliseconds(millis float64) time.Duration
- func Max(times ...time.Time) time.Time
- func Milliseconds(d time.Duration) float64
- func Min(times ...time.Time) (min time.Time)
- func MinMax(times ...time.Time) (min time.Time, max time.Time)
- func ToFloat64(t time.Time) float64
- type Ascending
- type Descending
Constants ¶
View Source
const ( SecondsPerHour = 60 * 60 SecondsPerDay = 60 * 60 * 24 )
SecondsPerXYZ
Variables ¶
This section is empty.
Functions ¶
func FromMilliseconds ¶
FromMilliseconds returns a duration from a given float64 millis value.
func Milliseconds ¶
Milliseconds returns a duration as milliseconds.
Types ¶
type Descending ¶
Descending sorts a given list of times ascending, or min to max.
Click to show internal directories.
Click to hide internal directories.