journeys: cancelled flag, 1.3.0

see derhuerst/vbb-rest#19
This commit is contained in:
Jannis R 2017-12-06 19:36:35 +01:00
parent 9203ed1481
commit 4ee1b27ae6
No known key found for this signature in database
GPG key ID: 0FE83946296A88A5
2 changed files with 5 additions and 1 deletions

View file

@ -1,7 +1,7 @@
{ {
"name": "hafas-client", "name": "hafas-client",
"description": "JavaScript client for HAFAS mobile APIs.", "description": "JavaScript client for HAFAS mobile APIs.",
"version": "1.2.6", "version": "1.3.0",
"main": "index.js", "main": "index.js",
"files": [ "files": [
"index.js", "index.js",

View file

@ -119,6 +119,10 @@ const part = (tz, s, ln, r, c) => (pt) => {
when: dateTime(tz, c.date, a.stopL[0].dTimeS).format() when: dateTime(tz, c.date, a.stopL[0].dTimeS).format()
})) }))
} }
// todo: follow public-transport/friendly-public-transport-format#27 here
if (pt.dep.dCncl && pt.arr.dCncl) result.cancelled = true
return result return result
} }