Documentation
¶
Index ¶
Constants ¶
View Source
const ( OneSecMs = 1000 OneMinuteMs = 60 * OneSecMs OneHourMs = 60 * OneMinuteMs OneDayMs = 24 * OneHourMs OneYearMs = 365 * OneDayMs )
Variables ¶
This section is empty.
Functions ¶
func Str2duration ¶
Convert a "[0-9]+[mhd]" duration string (for example, "24h") to a Unix timestamp in milliseconds integer
func String2Time ¶
Convert a time string to a time object. The input time string can be of the format "now", "now-[0-9]+[mdh]" (for example, "now-2h"), "<Unix timestamp>", or "<RFC 3339 time>" (for example, "2018-09-26T14:10:20Z").
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.