Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrBadFormat is returned when parsing fails ErrBadFormat = errors.New("bad format string") )
Functions ¶
This section is empty.
Types ¶
type Duration ¶
func FromString ¶
func (*Duration) HasTimePart ¶
func (*Duration) RelativeTo ¶ added in v0.3.0
func (*Duration) String ¶
String prints out the value passed in. It's not strictly according to the ISO spec, but it's pretty close. In particular, to completely conform it would need to round up to the next largest unit. 61 seconds to 1 minute 1 second, for example. It would also need to disallow weeks mingling with other units.
Click to show internal directories.
Click to hide internal directories.