remove 0 milliseconds from docs & tests

This commit is contained in:
Jannis R 2019-04-23 17:55:46 +02:00 committed by Jannis Redmann
parent 831bcaf4c9
commit 26069806e0
6 changed files with 35 additions and 35 deletions

View file

@ -81,7 +81,7 @@ The response may look like this:
regional: true
}
},
when: '2017-12-17T19:32:00.000+01:00',
when: '2017-12-17T19:32:00+01:00',
delay: null,
platform: '2',
line: {
@ -132,7 +132,7 @@ The response may look like this:
tripId: '1|28671|4|86|17122017',
trip: 28671,
stop: { /* … */ },
when: '2017-12-17T19:35:00.000+01:00',
when: '2017-12-17T19:35:00+01:00',
delay: 0,
platform: null,
line: {

View file

@ -133,10 +133,10 @@ The `Promise` returned by `journeys()` will resolve with an object with the `jou
},
products: { /* … */ }
},
departure: '2018-07-10T23:54:00.000+02:00',
departure: '2018-07-10T23:54:00+02:00',
departureDelay: 60,
departurePlatform: '15',
arrival: '2018-07-11T00:02:00.000+02:00',
arrival: '2018-07-11T00:02:00+02:00',
arrivalDelay: 60,
arrivalPlatform: '3',
line: {
@ -182,10 +182,10 @@ The `Promise` returned by `journeys()` will resolve with an object with the `jou
location: { /* … */ },
products: { /* … */ }
},
arrival: '2018-07-10T23:56:00.000+02:00',
arrival: '2018-07-10T23:56:00+02:00',
arrivalDelay: 60,
arrivalPlatform: null,
departure: '2018-07-10T23:57:00.000+02:00',
departure: '2018-07-10T23:57:00+02:00',
departureDelay: 60,
departurePlatform: null,
remarks: [ /* … */ ]
@ -198,10 +198,10 @@ The `Promise` returned by `journeys()` will resolve with an object with the `jou
location: { /* … */ },
products: { /* … */ }
},
arrival: '2018-07-11T00:02:00.000+02:00',
arrival: '2018-07-11T00:02:00+02:00',
arrivalDelay: 60,
arrivalPlatform: null,
departure: '2018-07-11T00:02:00.000+02:00',
departure: '2018-07-11T00:02:00+02:00',
departureDelay: null,
departurePlatform: null,
remarks: [ /* … */ ]
@ -221,8 +221,8 @@ The `Promise` returned by `journeys()` will resolve with an object with the `jou
location: { /* … */ },
products: { /* … */ }
},
departure: '2018-07-11T00:01:00.000+02:00',
arrival: '2018-07-11T00:10:00.000+02:00',
departure: '2018-07-11T00:01:00+02:00',
arrival: '2018-07-11T00:10:00+02:00',
public: true,
walking: true,
distance: 558
@ -296,8 +296,8 @@ client.journeys(hbf, heinrichHeineStr)
```
```
departure of last journey 2017-12-17T19:07:00.000+01:00
departure of first (later) journey 2017-12-17T19:19: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+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.

View file

@ -90,7 +90,7 @@ The response may look like this:
},
arrival: null,
arrivalDelay: null,
departure: '2017-12-17T19:16:00.000+01:00',
departure: '2017-12-17T19:16:00+01:00',
departureDelay: null
} /* … */ ],
frames: [ {
@ -145,13 +145,13 @@ The response may look like this:
stop: { /* S+U Alexanderplatz/Dircksenstr. */ },
arrival: null,
arrivalDelay: null,
departure: '2017-12-17T19:52:00.000+01:00',
departure: '2017-12-17T19:52:00+01:00',
departureDelay: null
}, {
stop: { /* Memhardstr. */ },
arrival: '2017-12-17T19:54:00.000+01:00',
arrival: '2017-12-17T19:54:00+01:00',
arrivalDelay: null,
departure: '2017-12-17T19:54:00.000+01:00',
departure: '2017-12-17T19:54:00+01:00',
departureDelay: null
}, /* … */ ],
frames: [ {

View file

@ -74,7 +74,7 @@ The response looked like this:
regional: true
}
},
departure: '2017-12-17T18:37:00.000+01:00',
departure: '2017-12-17T18:37:00+01:00',
departurePlatform: '13',
destination: {
type: 'station',
@ -95,7 +95,7 @@ The response looked like this:
regional: true
}
},
arrival: '2017-12-17T19:49:00.000+01:00',
arrival: '2017-12-17T19:49:00+01:00',
arrivalPlatform: '2',
line: {
type: 'line',

View file

@ -84,7 +84,7 @@ The returned [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript
},
products: { /* … */ }
},
departure: '2017-12-17T17:05:00.000+01:00',
departure: '2017-12-17T17:05:00+01:00',
departurePlatform: '5',
destination: {
type: 'station',
@ -93,7 +93,7 @@ The returned [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript
location: { /* … */ },
products: { /* … */ }
},
arrival: '2017-12-17T17:08:00.000+01:00',
arrival: '2017-12-17T17:08:00+01:00',
arrivalPlatform: '1',
line: {
type: 'line',
@ -121,7 +121,7 @@ The returned [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript
},
products: { /* … */ }
},
departure: '2017-12-17T17:25:00.000+01:00',
departure: '2017-12-17T17:25:00+01:00',
destination: {
type: 'station',
id: '8098160',
@ -129,7 +129,7 @@ The returned [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript
location: { /* … */ },
products: { /* … */ }
},
arrival: '2017-12-17T17:33:00.000+01:00',
arrival: '2017-12-17T17:33:00+01:00',
public: true,
walking: true
}, {
@ -141,7 +141,7 @@ The returned [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript
location: { /* … */ },
products: { /* … */ }
},
departure: '2017-12-17T17:37:00.000+01:00',
departure: '2017-12-17T17:37:00+01:00',
departurePlatform: '1',
destination: {
type: 'station',
@ -150,7 +150,7 @@ The returned [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript
location: { /* … */ },
products: { /* … */ }
},
arrival: '2017-12-17T22:45:00.000+01:00',
arrival: '2017-12-17T22:45:00+01:00',
arrivalPlatform: '13',
line: { /* … */ },
direction: 'München Hbf'
@ -162,7 +162,7 @@ The returned [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript
location: { /* … */ },
products: { /* … */ }
},
departure: '2017-12-17T17:05:00.000+01:00',
departure: '2017-12-17T17:05:00+01:00',
destination: {
type: 'station',
id: '8000261',
@ -170,7 +170,7 @@ The returned [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript
location: { /* … */ },
products: { /* … */ }
},
arrival: '2017-12-17T22:45:00.000+01:00',
arrival: '2017-12-17T22:45:00+01:00',
price: {
amount: null,
hint: 'No pricing information available.'

View file

@ -17,7 +17,7 @@ test('exposes the profile', (t) => {
test('parseDateTime: works', (t) => {
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 assert = (args, expected) => {
@ -33,18 +33,18 @@ test('parseDateTime: works', (t) => {
// manual timezone offset
assert(['20190318', '131910', 60, false], whenStr)
assert(['20190318', '131910', 60, true], when)
assert(['20190318', '131910', 120, false], '2019-03-18T13:19:10.000+02:00')
assert(['20190318', '131910', 120, true], +new Date('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+02:00'))
// day offset
assert(['20190318', '2131910', null, false], '2019-03-20T13:19:10.000+01:00')
assert(['20190318', '2131910', null, true], +new Date('2019-03-20T13:19:10.000+01:00'))
assert(['20190318', '02131910', null, false], '2019-03-20T13:19:10.000+01:00')
assert(['20190318', '02131910', null, true], +new Date('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+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+01:00'))
// manual timezone offset day offset
assert(['20190318', '02131910', 150, false], '2019-03-20T13:19:10.000+02:30')
assert(['20190318', '02131910', 150, true], +new Date('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+02:30'))
t.end()
})