Skip to content

Internals

BaseIsoWeek

BaseIsoWeek is an abstract base class that provides:

  • Template for functionalities that need to be implemented the shared functionalities to work with ISO Week date in different formats.

It is not meant to be used directly, but it is the base class for both IsoWeek and IsoWeekDate classes.

The functionalities provided by the BaseIsoWeek class directly are:

  • Validation method(s) to check if a string matches a certain format/pattern
  • range method to generate a range between a start and end isoweek(date)s.
  • Properties such as year and week to access the year and week number of the instance as int.

Other functionalities are provided by mean of Mixin's:

  • Parsing methods (from_string, from_compact, from_date, from_datetime) (via ParserMixin)
  • Conversion methods (to_string, to_compact, to_date, to_datetime) (via ConverterMixin)
  • All the comparison operators (==, !=, <, <=, >, >=) (via ComparatorMixin)