mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 15:19:35 +02:00
remove 0 milliseconds from docs & tests
This commit is contained in:
parent
831bcaf4c9
commit
26069806e0
6 changed files with 35 additions and 35 deletions
|
@ -81,7 +81,7 @@ The response may look like this:
|
||||||
regional: true
|
regional: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
when: '2017-12-17T19:32:00.000+01:00',
|
when: '2017-12-17T19:32:00+01:00',
|
||||||
delay: null,
|
delay: null,
|
||||||
platform: '2',
|
platform: '2',
|
||||||
line: {
|
line: {
|
||||||
|
@ -132,7 +132,7 @@ The response may look like this:
|
||||||
tripId: '1|28671|4|86|17122017',
|
tripId: '1|28671|4|86|17122017',
|
||||||
trip: 28671,
|
trip: 28671,
|
||||||
stop: { /* … */ },
|
stop: { /* … */ },
|
||||||
when: '2017-12-17T19:35:00.000+01:00',
|
when: '2017-12-17T19:35:00+01:00',
|
||||||
delay: 0,
|
delay: 0,
|
||||||
platform: null,
|
platform: null,
|
||||||
line: {
|
line: {
|
||||||
|
|
|
@ -133,10 +133,10 @@ The `Promise` returned by `journeys()` will resolve with an object with the `jou
|
||||||
},
|
},
|
||||||
products: { /* … */ }
|
products: { /* … */ }
|
||||||
},
|
},
|
||||||
departure: '2018-07-10T23:54:00.000+02:00',
|
departure: '2018-07-10T23:54:00+02:00',
|
||||||
departureDelay: 60,
|
departureDelay: 60,
|
||||||
departurePlatform: '15',
|
departurePlatform: '15',
|
||||||
arrival: '2018-07-11T00:02:00.000+02:00',
|
arrival: '2018-07-11T00:02:00+02:00',
|
||||||
arrivalDelay: 60,
|
arrivalDelay: 60,
|
||||||
arrivalPlatform: '3',
|
arrivalPlatform: '3',
|
||||||
line: {
|
line: {
|
||||||
|
@ -182,10 +182,10 @@ The `Promise` returned by `journeys()` will resolve with an object with the `jou
|
||||||
location: { /* … */ },
|
location: { /* … */ },
|
||||||
products: { /* … */ }
|
products: { /* … */ }
|
||||||
},
|
},
|
||||||
arrival: '2018-07-10T23:56:00.000+02:00',
|
arrival: '2018-07-10T23:56:00+02:00',
|
||||||
arrivalDelay: 60,
|
arrivalDelay: 60,
|
||||||
arrivalPlatform: null,
|
arrivalPlatform: null,
|
||||||
departure: '2018-07-10T23:57:00.000+02:00',
|
departure: '2018-07-10T23:57:00+02:00',
|
||||||
departureDelay: 60,
|
departureDelay: 60,
|
||||||
departurePlatform: null,
|
departurePlatform: null,
|
||||||
remarks: [ /* … */ ]
|
remarks: [ /* … */ ]
|
||||||
|
@ -198,10 +198,10 @@ The `Promise` returned by `journeys()` will resolve with an object with the `jou
|
||||||
location: { /* … */ },
|
location: { /* … */ },
|
||||||
products: { /* … */ }
|
products: { /* … */ }
|
||||||
},
|
},
|
||||||
arrival: '2018-07-11T00:02:00.000+02:00',
|
arrival: '2018-07-11T00:02:00+02:00',
|
||||||
arrivalDelay: 60,
|
arrivalDelay: 60,
|
||||||
arrivalPlatform: null,
|
arrivalPlatform: null,
|
||||||
departure: '2018-07-11T00:02:00.000+02:00',
|
departure: '2018-07-11T00:02:00+02:00',
|
||||||
departureDelay: null,
|
departureDelay: null,
|
||||||
departurePlatform: null,
|
departurePlatform: null,
|
||||||
remarks: [ /* … */ ]
|
remarks: [ /* … */ ]
|
||||||
|
@ -221,8 +221,8 @@ The `Promise` returned by `journeys()` will resolve with an object with the `jou
|
||||||
location: { /* … */ },
|
location: { /* … */ },
|
||||||
products: { /* … */ }
|
products: { /* … */ }
|
||||||
},
|
},
|
||||||
departure: '2018-07-11T00:01:00.000+02:00',
|
departure: '2018-07-11T00:01:00+02:00',
|
||||||
arrival: '2018-07-11T00:10:00.000+02:00',
|
arrival: '2018-07-11T00:10:00+02:00',
|
||||||
public: true,
|
public: true,
|
||||||
walking: true,
|
walking: true,
|
||||||
distance: 558
|
distance: 558
|
||||||
|
@ -296,8 +296,8 @@ client.journeys(hbf, heinrichHeineStr)
|
||||||
```
|
```
|
||||||
|
|
||||||
```
|
```
|
||||||
departure of last journey 2017-12-17T19:07:00.000+01:00
|
departure of last journey 2017-12-17T19:07:00+01:00
|
||||||
departure of first (later) journey 2017-12-17T19:19:00.000+01:00
|
departure of first (later) journey 2017-12-17T19:19:00+01:00
|
||||||
```
|
```
|
||||||
|
|
||||||
If you pass `polylines: true`, each journey leg will have a `polyline` field. Refer to [the section in the `trip()` docs](trip.md#polyline-option) for details.
|
If you pass `polylines: true`, each journey leg will have a `polyline` field. Refer to [the section in the `trip()` docs](trip.md#polyline-option) for details.
|
||||||
|
|
|
@ -90,7 +90,7 @@ The response may look like this:
|
||||||
},
|
},
|
||||||
arrival: null,
|
arrival: null,
|
||||||
arrivalDelay: null,
|
arrivalDelay: null,
|
||||||
departure: '2017-12-17T19:16:00.000+01:00',
|
departure: '2017-12-17T19:16:00+01:00',
|
||||||
departureDelay: null
|
departureDelay: null
|
||||||
} /* … */ ],
|
} /* … */ ],
|
||||||
frames: [ {
|
frames: [ {
|
||||||
|
@ -145,13 +145,13 @@ The response may look like this:
|
||||||
stop: { /* S+U Alexanderplatz/Dircksenstr. */ },
|
stop: { /* S+U Alexanderplatz/Dircksenstr. */ },
|
||||||
arrival: null,
|
arrival: null,
|
||||||
arrivalDelay: null,
|
arrivalDelay: null,
|
||||||
departure: '2017-12-17T19:52:00.000+01:00',
|
departure: '2017-12-17T19:52:00+01:00',
|
||||||
departureDelay: null
|
departureDelay: null
|
||||||
}, {
|
}, {
|
||||||
stop: { /* Memhardstr. */ },
|
stop: { /* Memhardstr. */ },
|
||||||
arrival: '2017-12-17T19:54:00.000+01:00',
|
arrival: '2017-12-17T19:54:00+01:00',
|
||||||
arrivalDelay: null,
|
arrivalDelay: null,
|
||||||
departure: '2017-12-17T19:54:00.000+01:00',
|
departure: '2017-12-17T19:54:00+01:00',
|
||||||
departureDelay: null
|
departureDelay: null
|
||||||
}, /* … */ ],
|
}, /* … */ ],
|
||||||
frames: [ {
|
frames: [ {
|
||||||
|
|
|
@ -74,7 +74,7 @@ The response looked like this:
|
||||||
regional: true
|
regional: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
departure: '2017-12-17T18:37:00.000+01:00',
|
departure: '2017-12-17T18:37:00+01:00',
|
||||||
departurePlatform: '13',
|
departurePlatform: '13',
|
||||||
destination: {
|
destination: {
|
||||||
type: 'station',
|
type: 'station',
|
||||||
|
@ -95,7 +95,7 @@ The response looked like this:
|
||||||
regional: true
|
regional: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
arrival: '2017-12-17T19:49:00.000+01:00',
|
arrival: '2017-12-17T19:49:00+01:00',
|
||||||
arrivalPlatform: '2',
|
arrivalPlatform: '2',
|
||||||
line: {
|
line: {
|
||||||
type: 'line',
|
type: 'line',
|
||||||
|
|
16
readme.md
16
readme.md
|
@ -84,7 +84,7 @@ The returned [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript
|
||||||
},
|
},
|
||||||
products: { /* … */ }
|
products: { /* … */ }
|
||||||
},
|
},
|
||||||
departure: '2017-12-17T17:05:00.000+01:00',
|
departure: '2017-12-17T17:05:00+01:00',
|
||||||
departurePlatform: '5',
|
departurePlatform: '5',
|
||||||
destination: {
|
destination: {
|
||||||
type: 'station',
|
type: 'station',
|
||||||
|
@ -93,7 +93,7 @@ The returned [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript
|
||||||
location: { /* … */ },
|
location: { /* … */ },
|
||||||
products: { /* … */ }
|
products: { /* … */ }
|
||||||
},
|
},
|
||||||
arrival: '2017-12-17T17:08:00.000+01:00',
|
arrival: '2017-12-17T17:08:00+01:00',
|
||||||
arrivalPlatform: '1',
|
arrivalPlatform: '1',
|
||||||
line: {
|
line: {
|
||||||
type: 'line',
|
type: 'line',
|
||||||
|
@ -121,7 +121,7 @@ The returned [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript
|
||||||
},
|
},
|
||||||
products: { /* … */ }
|
products: { /* … */ }
|
||||||
},
|
},
|
||||||
departure: '2017-12-17T17:25:00.000+01:00',
|
departure: '2017-12-17T17:25:00+01:00',
|
||||||
destination: {
|
destination: {
|
||||||
type: 'station',
|
type: 'station',
|
||||||
id: '8098160',
|
id: '8098160',
|
||||||
|
@ -129,7 +129,7 @@ The returned [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript
|
||||||
location: { /* … */ },
|
location: { /* … */ },
|
||||||
products: { /* … */ }
|
products: { /* … */ }
|
||||||
},
|
},
|
||||||
arrival: '2017-12-17T17:33:00.000+01:00',
|
arrival: '2017-12-17T17:33:00+01:00',
|
||||||
public: true,
|
public: true,
|
||||||
walking: true
|
walking: true
|
||||||
}, {
|
}, {
|
||||||
|
@ -141,7 +141,7 @@ The returned [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript
|
||||||
location: { /* … */ },
|
location: { /* … */ },
|
||||||
products: { /* … */ }
|
products: { /* … */ }
|
||||||
},
|
},
|
||||||
departure: '2017-12-17T17:37:00.000+01:00',
|
departure: '2017-12-17T17:37:00+01:00',
|
||||||
departurePlatform: '1',
|
departurePlatform: '1',
|
||||||
destination: {
|
destination: {
|
||||||
type: 'station',
|
type: 'station',
|
||||||
|
@ -150,7 +150,7 @@ The returned [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript
|
||||||
location: { /* … */ },
|
location: { /* … */ },
|
||||||
products: { /* … */ }
|
products: { /* … */ }
|
||||||
},
|
},
|
||||||
arrival: '2017-12-17T22:45:00.000+01:00',
|
arrival: '2017-12-17T22:45:00+01:00',
|
||||||
arrivalPlatform: '13',
|
arrivalPlatform: '13',
|
||||||
line: { /* … */ },
|
line: { /* … */ },
|
||||||
direction: 'München Hbf'
|
direction: 'München Hbf'
|
||||||
|
@ -162,7 +162,7 @@ The returned [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript
|
||||||
location: { /* … */ },
|
location: { /* … */ },
|
||||||
products: { /* … */ }
|
products: { /* … */ }
|
||||||
},
|
},
|
||||||
departure: '2017-12-17T17:05:00.000+01:00',
|
departure: '2017-12-17T17:05:00+01:00',
|
||||||
destination: {
|
destination: {
|
||||||
type: 'station',
|
type: 'station',
|
||||||
id: '8000261',
|
id: '8000261',
|
||||||
|
@ -170,7 +170,7 @@ The returned [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript
|
||||||
location: { /* … */ },
|
location: { /* … */ },
|
||||||
products: { /* … */ }
|
products: { /* … */ }
|
||||||
},
|
},
|
||||||
arrival: '2017-12-17T22:45:00.000+01:00',
|
arrival: '2017-12-17T22:45:00+01:00',
|
||||||
price: {
|
price: {
|
||||||
amount: null,
|
amount: null,
|
||||||
hint: 'No pricing information available.'
|
hint: 'No pricing information available.'
|
||||||
|
|
|
@ -17,7 +17,7 @@ test('exposes the profile', (t) => {
|
||||||
|
|
||||||
test('parseDateTime: works', (t) => {
|
test('parseDateTime: works', (t) => {
|
||||||
const profile = {timezone: 'Europe/Berlin', locale: 'de-DE'}
|
const profile = {timezone: 'Europe/Berlin', locale: 'de-DE'}
|
||||||
const whenStr = '2019-03-18T13:19:10.000+01:00'
|
const whenStr = '2019-03-18T13:19:10+01:00'
|
||||||
const when = +new Date(whenStr)
|
const when = +new Date(whenStr)
|
||||||
|
|
||||||
const assert = (args, expected) => {
|
const assert = (args, expected) => {
|
||||||
|
@ -33,18 +33,18 @@ test('parseDateTime: works', (t) => {
|
||||||
// manual timezone offset
|
// manual timezone offset
|
||||||
assert(['20190318', '131910', 60, false], whenStr)
|
assert(['20190318', '131910', 60, false], whenStr)
|
||||||
assert(['20190318', '131910', 60, true], when)
|
assert(['20190318', '131910', 60, true], when)
|
||||||
assert(['20190318', '131910', 120, false], '2019-03-18T13:19:10.000+02:00')
|
assert(['20190318', '131910', 120, false], '2019-03-18T13:19:10+02:00')
|
||||||
assert(['20190318', '131910', 120, true], +new Date('2019-03-18T13:19:10.000+02:00'))
|
assert(['20190318', '131910', 120, true], +new Date('2019-03-18T13:19:10+02:00'))
|
||||||
|
|
||||||
// day offset
|
// day offset
|
||||||
assert(['20190318', '2131910', null, false], '2019-03-20T13:19:10.000+01:00')
|
assert(['20190318', '2131910', null, false], '2019-03-20T13:19:10+01:00')
|
||||||
assert(['20190318', '2131910', null, true], +new Date('2019-03-20T13:19:10.000+01:00'))
|
assert(['20190318', '2131910', null, true], +new Date('2019-03-20T13:19:10+01:00'))
|
||||||
assert(['20190318', '02131910', null, false], '2019-03-20T13:19:10.000+01:00')
|
assert(['20190318', '02131910', null, false], '2019-03-20T13:19:10+01:00')
|
||||||
assert(['20190318', '02131910', null, true], +new Date('2019-03-20T13:19:10.000+01:00'))
|
assert(['20190318', '02131910', null, true], +new Date('2019-03-20T13:19:10+01:00'))
|
||||||
|
|
||||||
// manual timezone offset day offset
|
// manual timezone offset day offset
|
||||||
assert(['20190318', '02131910', 150, false], '2019-03-20T13:19:10.000+02:30')
|
assert(['20190318', '02131910', 150, false], '2019-03-20T13:19:10+02:30')
|
||||||
assert(['20190318', '02131910', 150, true], +new Date('2019-03-20T13:19:10.000+02:30'))
|
assert(['20190318', '02131910', 150, true], +new Date('2019-03-20T13:19:10+02:30'))
|
||||||
|
|
||||||
t.end()
|
t.end()
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Reference in a new issue