Originally Posted by
ORDtoAnywhere
Regardless, be aware that the flight must be booked at least 7 days in advance for the 24-hour cancellation rule to apply. If departure is within 7 days, that rule does not apply.
Legally this is true, but practically UA has generally not "enforced" this limitation on legal obligation and has refunded tickets cancelled within 24 hours even inside 7 days.