code: def is_correct(self):
          
          valid = True
          valid &= self.swday in range(7)
          if not valid:
              logger.error("Error: %s is not a valid day", self.swday)
  
          valid &= self.ewday in range(7)
          if not valid:
              logger.error("Error: %s is not a valid day", self.ewday)
  
          return valid
docs: Check if the Daterange is correct : weekdays are valid
  
          :return: True if weekdays are valid, False otherwise
          :rtype: bool