Commit 903ea188 authored by Volker Krause's avatar Volker Krause
Browse files

Relax Ryanair boarding pass time search a bit

There's multiple variants how the arrival timezone is expressed.
parent d1df2eea
Pipeline #234803 passed with stage
in 6 minutes and 14 seconds
......@@ -7,7 +7,7 @@ function parseBoardingPass(pdf, node, triggerNode) {
var res = triggerNode.result[0];
const page = pdf.pages[triggerNode.location];
const timesText = page.textInRect(0.5, 0.5, 1, 1);
const times = timesText.match(/\n(\d\d:\d\d)[\s\S]*?\n(\d\d:\d\d)[\s\S]*?\n(\d\d:\d\d)[\s\S]*?\n(\d\d:\d\d)[\s\S]*?\d\d:\d\d\./);
const times = timesText.match(/\n(\d\d:\d\d)[\s\S]*?\n(\d\d:\d\d)[\s\S]*?\n(\d\d:\d\d)[\s\S]*?\n(\d\d:\d\d)/);
res.reservationFor.boardingTime = JsonLd.toDateTime(times[2], "hh:mm", "en");
res.reservationFor.departureTime = JsonLd.toDateTime(times[3], "hh:mm", "en");
res.reservationFor.arrivalTime = JsonLd.toDateTime(times[4], "hh:mm", "en");
Supports Markdown
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