Documentation ¶
Index ¶
Constants ¶
View Source
const ( Second = time.Second Minute = Second * 60 Hour = Minute * 60 Day = Hour * 24 Month = Day * 30 Year = Day * 365 )
Time constant as time.Duration
Variables ¶
View Source
var DurationRegex = regexp.MustCompile(`P([\d\.]+Y)?([\d\.]+M)?([\d\.]+D)?T([\d\.]+H)?([\d\.]+M)?([\d\.]+?S)?`)
DurationRegex regular expression for duration iso 8601
Functions ¶
func EncodeDuration ¶
EncodeDuration converts a time.Duration to an ISO8601 duration string examples :
3h -> PT3H 7h22min -> PT7h22M
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.