Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NowFunc = time.Now
Functions ¶
func As ¶ added in v0.2.1
As returns the T as if it was read in the location originally. It is similar to time.In except this function treats the input as zone less. Input of 6pm will become 6pm in the new location.
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 EOM will calculate the end of month 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.