Miscellaneous: Doing the addition is easier to understand and gives us the date on which we can cancel. allow_date = self.appointment_id.booking_date + relativedelta.relativedelta(days=int(cancel_days)) if today < allow_date: raise ValidationError(_('Cancellation is not allowed within %s day of booking. You can cancel it on %s' % (cancel_days, allow_date)))