chrono.parser.Parser - Base class for parsers

class chrono.parser.Parser

Base parser class, with utility methods for subclasses.

classmethod regexp(regexp, subject)

Parses subject based on the regular expression object regexp, returns a dict of named captured groups.

Raises chrono.error.ParseError if the subject doesn’t match the expression, or TypeError on invalid (ie non-string) subject type.

Previous topic

chrono.parser - Parsers for various date/time formats

Next topic

chrono.parser.CommonParser - Parser for most common formats