Skip to content
GitLab
Menu
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
8b6f5137
Commit
8b6f5137
authored
May 30, 2021
by
Volker Krause
Browse files
Fix single digit day date parsing in oui.sncf confirmation emails
BUG: 437854
FIXED-IN: 21.04.2
parent
4ada7047
Pipeline
#63544
passed with stages
in 8 minutes and 55 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/lib/extractors/sncf.js
View file @
8b6f5137
...
...
@@ -280,10 +280,10 @@ function parseOuigoSummaryTime(htmlElem)
var
timeStr
=
htmlElem
[
0
].
recursiveContent
;
var
time
=
timeStr
.
match
(
/
(\d
+
[^
]
+
\d
+
)
+
[^
]
+
(\d
+:
\d
+
)
/
);
if
(
time
)
{
return
JsonLd
.
toDateTime
(
time
[
1
]
+
time
[
2
],
"
d
d
MMMM yyyyhh:mm
"
,
"
fr
"
);
return
JsonLd
.
toDateTime
(
time
[
1
]
+
time
[
2
],
"
d MMMM yyyyhh:mm
"
,
"
fr
"
);
}
time
=
timeStr
.
match
(
/
(\d
+
[^
]
+
)
+
[^
]
+ +
(\d
+
[
:h
]\d
+
)
/
);
return
JsonLd
.
toDateTime
(
time
[
1
]
+
time
[
2
].
replace
(
'
h
'
,
'
:
'
),
"
d
d
MMMMhh:mm
"
,
"
fr
"
);
return
JsonLd
.
toDateTime
(
time
[
1
]
+
time
[
2
].
replace
(
'
h
'
,
'
:
'
),
"
d MMMMhh:mm
"
,
"
fr
"
);
}
function
parseOuigoSummary
(
html
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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