Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrBadFormat is returned when parsing fails ErrBadFormat = errors.New("bad format string") // ErrNoMonth is raised when a month is in the format string ErrNoMonth = errors.New("no months allowed") // ErrZoneCharacters indicates an incorrect amount of characters was passed to ParseISOZone. ErrZoneCharacters = errors.New("ISO8601: Expected between 3 and 6 characters for zone information") // ErrInvalidZone indicates an invalid timezone per the standard that doesn't violate any specific // character parsing rules. ErrInvalidZone = errors.New("ISO8601: Specified zone is invalid") // ErrRemainingData indicates that there is extra data after a `Z` character. ErrRemainingData = errors.New("ISO8601: Unexepected remaining data after `Z`") // ErrNotString indicates that a non string type was passed to the UnmarshalJSON method of `Time`. ErrNotString = errors.New("ISO8601: Invalid json type (expected string)") // ErrPrecision indicates that there was too much precision (characters) given to parse // for the fraction of a second of the input time. ErrPrecision = errors.New("ISO8601: Too many characters in fraction of second precision") )
Functions ¶
func ParseDuration ¶
时间段表示法 P1Y3M5DT6H7M30S
func ParseTimeDate ¶
日期和时间的组合表示法 2023-10-10T00:00:00+08:00 时间
Types ¶
type RangeError ¶
RangeError indicates that a value is not in an expected range.
func (*RangeError) Error ¶
func (e *RangeError) Error() string
type UnexpectedCharacterError ¶
type UnexpectedCharacterError struct {
Character byte
}
UnexpectedCharacterError indicates the parser scanned a character that was not expected at that time.
func (*UnexpectedCharacterError) Error ¶
func (e *UnexpectedCharacterError) Error() string
Click to show internal directories.
Click to hide internal directories.