Documentation
¶
Index ¶
Constants ¶
const Format = "2006-01-02.15-04-05"
Format contains a time format string for use in combination with the rounded time functions. It is easy to read and omits sub-second resolution.
Variables ¶
This section is empty.
Functions ¶
func GetUTCDay ¶
Creates and returns a time.Time corresponding to the start of the UTC day containing the given date.
func GetUTCHour ¶
Creates and returns a time.Time corresponding to the start of the UTC hour containing the given date.
func JitterInterval ¶
JitterInterval returns a duration that some value between the interval and 2x the interval.
func RoundPartOfDay ¶
RoundPartOfDay produces a time value with the hour value rounded down to the most recent interval.
func RoundPartOfHour ¶
RoundPartOfHour produces a time value with the minute value rounded down to the most recent interval.
func RoundPartOfMinute ¶
RoundPartOfMinute produces a time value with the second value rounded down to the most recent interval.
func UnixMilli ¶
UnixMilli returns t as a Unix time, the number of nanoseconds elapsed since January 1, 1970 UTC. The result is undefined if the Unix time in nanoseconds in cannot be represented by an int64 (a date before the year 1678 or after 2262). Note that this means the result of calling UnixMilli on the zero Time on the zero Time is undefined. The result does not depend on the location associated with t.
Types ¶
This section is empty.