Commit 8b6f5137 authored by Volker Krause's avatar 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
......@@ -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], "dd 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', ':'), "dd MMMMhh:mm", "fr");
return JsonLd.toDateTime(time[1] + time[2].replace('h', ':'), "d MMMMhh:mm", "fr");
}
function parseOuigoSummary(html)
......
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