Expand description
Various scanning routines for the parser.
Enumsยง
- Comment
State ๐
Functionsยง
- char ๐
- Tries to consume exactly one given character.
- colon_
or_ ๐space - Consumes any number (including zero) of colon or spaces.
- comment_
2822 ๐ - Tries to consume an RFC2822 comment including preceding
- nanosecond ๐
- Tries to consume at least one digits as a fractional second. Returns the number of whole nanoseconds (0โ999,999,999).
- nanosecond_
fixed ๐ - Tries to consume a fixed number of digits as a fractional second. Returns the number of whole nanoseconds (0โ999,999,999).
- number ๐
- Tries to parse the non-negative number from
min
tomax
digits. - short_
month0 ๐ - Tries to parse the month index (0 through 11) with the first three ASCII letters.
- short_
or_ ๐long_ month0 - Tries to parse the month index (0 through 11) with short or long month names. It prefers long month names to short month names when both are possible.
- short_
or_ ๐long_ weekday - Tries to parse the weekday with short or long weekday names. It prefers long weekday names to short weekday names when both are possible.
- short_
weekday ๐ - Tries to parse the weekday with the first three ASCII letters.
- space ๐
- Tries to consume one or more whitespace.
- timezone_
offset ๐ - Parse a timezone from
s
and return the offset in seconds. - timezone_
offset_ ๐2822 - Same as
timezone_offset
but also allows for RFC 2822 legacy timezones. May returnNone
which indicates an insufficient offset data (i.e.-0000
). See RFC 2822 Section 4.3.