Documentation
¶
Overview ¶
Package time parses RFC3339 duration strings into time.Duration taken from https://github.com/peterhellberg/duration
Index ¶
Constants ¶
View Source
const ( // HoursPerDay is the number of hours per day according to Google HoursPerDay = 24.0 // HoursPerWeek is the number of hours per week according to Google HoursPerWeek = 168.0 // HoursPerMonth is the number of hours per month according to Google HoursPerMonth = 730.4841667 // HoursPerYear is the number of hours per year according to Google HoursPerYear = 8765.81 )
Variables ¶
View Source
var ( // ErrInvalidString is returned when passed an invalid string ErrInvalidString = fmt.Errorf("invalid duration string") // ErrUnsupportedFormat is returned when parsing fails ErrUnsupportedFormat = fmt.Errorf("unsupported duration string format") )
Functions ¶
This section is empty.
Types ¶
type ISODuration ¶
type ISODuration string
ISODuration - iso representation of
func ParseDuration ¶
func ParseDuration(s string) (*ISODuration, error)
ParseDuration a RFC3339 duration string into time.Duration
Click to show internal directories.
Click to hide internal directories.