Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KItinerary
Commits
903ea188
Commit
903ea188
authored
Sep 20, 2022
by
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
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/lib/scripts/ryanair.js
View file @
903ea188
...
...
@@ -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
"
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment