Commit abd91a63 authored by Volker Krause's avatar Volker Krause

Fix extraction of arrival/departure time for Brussels Airlines

Besides the type in the second if() this wasn't considering terminal
information that might appear in the same line.
parent b90be01c
......@@ -34,11 +34,11 @@ function extractColumn(page, offset) {
}
}
var dep = text.match(/Departure time\s(\d{1,2} \w+ \d{4})\s+(\d{1,2}:\d{2})/);
var dep = text.match(/Departure time.*\n(\d{1,2} \w+ \d{4})\s+(\d{1,2}:\d{2})/);
if (dep)
res.reservationFor.departureTime = JsonLd.toDateTime(dep[1] + " " + dep[2], "dd MMMM yyyy hh:mm", "en");
var arr = text.match(/Arrival time\s(\d{1,2} \w+ \d{4})\s+(\d{1,2}:\d{2})/);
if (dep)
var arr = text.match(/Arrival time.*\n(\d{1,2} \w+ \d{4})\s+(\d{1,2}:\d{2})/);
if (arr)
res.reservationFor.arrivalTime = JsonLd.toDateTime(arr[1] + " " + arr[2], "dd MMMM yyyy hh:mm", "en");
return res;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment