Versions in this module Expand all Collapse all v0 v0.1.0 Apr 4, 2024 Changes in this version + func NoRangeChecking(position int, value time.Duration, totalSoFar time.Duration) bool + func ParseDuration(input string, defaultUnit Unit, parseMode ParseMode, ...) (time.Duration, error) + type OverflowError struct + func (e *OverflowError) Error() string + func (e *OverflowError) Is(target error) bool + func (e *OverflowError) Position() int + type ParseMode int + const ParseModeMultiUnit + const ParseModeSingleUnit + type RangeChecker func(position int, value time.Duration, totalSoFar time.Duration) bool + type RangeError struct + func (e *RangeError) Error() string + func (e *RangeError) Is(target error) bool + func (e *RangeError) Position() int + type SyntaxError struct + func (e *SyntaxError) Cause() SyntaxErrorCause + func (e *SyntaxError) Error() string + func (e *SyntaxError) Is(target error) bool + func (e *SyntaxError) Position() int + type SyntaxErrorCause int + const InvalidNumber + const InvalidUnit + const InvalidUnitOrder + const UnexpectedCharactersInSingleUnitMode + type Unit uint + const Day + const Hour + const Microsecond + const Millisecond + const Minute + const Second