def partial_price(self): now = timezone.now() start = calculate_last(self.start_day, self.start_month) end = calculate_next(self.end_day, self.end_month) return self.calc_price(start, end, now)
def calculated_price(self, activation_date): start = calculate_last(self.start_day, self.start_month) end = calculate_next(self.end_day, self.end_month) ref_date = max(activation_date, start) return self.calc_price(start, end, ref_date=ref_date)
def get_actual_start(self, activation_date=None): start = calculate_last(self.start_day, self.start_month) if activation_date is None: return start return max(activation_date, start)