FR 998 then FR 2066 at Madrid
Wroclaw → Madrid → Ibiza
Timetable, Madrid time
21:20FR 998 from Wroclaw at the gate
13:45FR 2066 to Ibiza leaves the gate
16 h 25 apart on the timetable, overnight
FR 2066 leaves 16 h 25 after FR 998 arrives on the timetable: more than half a day, so not a connection we count.