AA 986 then UA 3904 at O'Hare
San Francisco → Chicago → Denver
Timetable, Chicago time
20:30AA 986 from San Francisco at the gate
19:00UA 3904 to Denver leaves the gate
22 h 30 apart on the timetable, overnight
UA 3904 leaves 22 h 30 after AA 986 arrives on the timetable: more than half a day, so not a connection we count.