Documentation ¶
Overview ¶
Package timeconv provides time conversion capabilities to Trickster
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var UnitMap = map[string]time.Duration{ "ns": time.Nanosecond, "u": time.Microsecond, "µ": time.Microsecond, "μ": time.Microsecond, "us": time.Microsecond, "µs": time.Microsecond, "μs": time.Microsecond, "ms": time.Millisecond, "s": time.Second, "m": time.Minute, "h": time.Hour, "d": 24 * time.Hour, "w": 24 * 7 * time.Hour, "y": 24 * 365 * time.Hour, }
UnitMap provides a map of common time unit abbreviations to their respective time.Durations
Functions ¶
func ParseDuration ¶
ParseDuration returns a duration from a string. Slightly improved over the builtin, since it supports units larger than hour.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.