Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NowFunc = time.Now
Functions ¶
func ToTime ¶
ToTime parses an offset duration string. The calculation is based on an optional anchor (default is NOW) plus a duration. Valid Anchors:
EOD will calculate the end of day EOY will calculate end of year
A duration string is a number and unit suffix, such as "300m", "1.5h" or "2h45m". Valid time units are "m", "h". If location is provided, calculations are set to the corresponding time zone. Examples:
"EOD+72h" = end of day in 3 days "3h" = 3 hours "EOY" = end of year "30m" = 30 minutes "" = now
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.