def check_next_collision(self, main_day, next_day):
     main_range = self.day_to_range_datetime(main_day, CURRENT)
     next_range = self.day_to_range_datetime(next_day, NEXT)
     intersection = RangeDateTimeOperator.get_intersection(
         main_range, next_range)
     if intersection:
         return intersection
     else:
         return None
 def check_prev_collision(self, main_day, prev_day):
     main_range = self.day_to_range_datetime(main_day, CURRENT)
     prev_range = self.day_to_range_datetime(prev_day, PREVIOUS)
     intersection = RangeDateTimeOperator.get_intersection(
         main_range, prev_range)
     if intersection:
         return intersection
     else:
         return None
 def check_current_collision(self, main_day: Any,
                             current_day: Any) -> Optional[RangeDateTime]:
     main_range = self.day_to_range_datetime(main_day, CURRENT)
     current_range = self.day_to_range_datetime(current_day, CURRENT)
     intersection = RangeDateTimeOperator.get_intersection(
         main_range, current_range)
     if intersection:
         return intersection
     else:
         return None
    def check_current_colision(
            self, current_day_name: str,
            main_range: RangeDateTime) -> Optional[RangeDateTime]:
        current_range = self.weekly_facade.range_datetime_obj_from_day_number(
            current_day_name, self.base_current_date)

        if not current_range:
            return None

        intersection = RangeDateTimeOperator.get_intersection(
            current_range, main_range)
        if intersection:
            return intersection
        else:
            return None
 def check_prev_collision(
         self, manually_range: RangeDateTime,
         weekly_day: Any) -> Tuple[Optional[int], Optional[RangeDateTime]]:
     prev_weekly_day = self.weekly_facade.get_prev_day(weekly_day)
     weekly_prev_range = self.weekly_facade.range_datetime_from_weekly_day(
         prev_weekly_day, self.base_prev_date)
     if weekly_prev_range:
         intersection = RangeDateTimeOperator.get_intersection(
             weekly_prev_range, manually_range)
         if intersection:
             return (prev_weekly_day.day_number, intersection)
         else:
             return (None, None)
     else:
         return (None, None)
    def check_current_collision(self, manually_day: Any,
                                cycle_day: Any) -> Optional[RangeDateTime]:
        current_range = self.cycle_facade.range_datetime_obj_from_day_number(
            cycle_day, self.base_current_date)

        manually_range = self.manually_facade.range_datetime_obj_from_day(
            manually_day, self.base_current_date)

        if current_range and manually_range:
            intersection = RangeDateTimeOperator.get_intersection(
                current_range, manually_range)
            if intersection:
                return intersection
            else:
                return None
        else:
            return None
    def check_current_collision(
            self, manually_range: RangeDateTime,
            weekly_day: Any) -> Tuple[Optional[int], Optional[RangeDateTime]]:
        weekly_current_range = self.weekly_facade\
            .range_datetime_from_weekly_day(
                weekly_day,
                self.base_current_date
            )

        if weekly_current_range:
            intersection = RangeDateTimeOperator.get_intersection(
                weekly_current_range, manually_range)
            if intersection:
                return weekly_day.day_number, intersection
            else:
                return None, None
        else:
            return None, None