pub enum ParseErrorKind {
FormatMismatch,
InvalidNumber,
InvalidDateValue,
UnsupportedSpecifier,
InvalidMonthName,
InvalidWeekdayName,
InvalidTimeValue,
}
Expand description
Specific kinds of parsing errors encountered by ParsiDate::parse
.
Variants§
FormatMismatch
The input string’s structure or literal characters do not match the expected format string.
InvalidNumber
A numeric component (year using %Y
, month using %m
, day using %d
)
contained non-digit characters or could not be parsed into a number.
Note: %m
and %d
require exactly two digits.
InvalidDateValue
The numeric components were successfully parsed from the string according to the format, but they form an invalid date logically (e.g., “1403/13/01” parsed with “%Y/%m/%d”).
UnsupportedSpecifier
An unrecognized or unsupported format specifier was used in the format string
(e.g., %x
). Supported specifiers are %Y
, %m
, %d
, %B
, %%
.
InvalidMonthName
A Persian month name expected by %B
could not be recognized in the input string
at the current position.
InvalidWeekdayName
Reserved for future use if weekday parsing (%A
) is implemented. Currently unused.
InvalidTimeValue
A time component (hour using %H
, minute using %M
, second using %S
)
was parsed successfully but forms an invalid time logically (e.g., “25:00:00”).
Trait Implementations§
Source§impl Clone for ParseErrorKind
impl Clone for ParseErrorKind
Source§fn clone(&self) -> ParseErrorKind
fn clone(&self) -> ParseErrorKind
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more