@@ -227,7 +227,7 @@ describe('updateDaySinceDeparture', () => {
227
227
arrival : { time : '10:00:00' } ,
228
228
} ,
229
229
] as TimesStopsInputRow [ ] ;
230
- const startTime = '2024-08-13T10:00:00' ;
230
+ const startTime = new Date ( '2024-08-13T10:00:00' ) ;
231
231
const result = updateDaySinceDeparture ( TimesStopsInputRows , startTime , {
232
232
keepFirstIndexArrival : true ,
233
233
} ) ;
@@ -261,7 +261,7 @@ describe('updateDaySinceDeparture', () => {
261
261
stopFor : '1800' ,
262
262
} ,
263
263
] as TimesStopsInputRow [ ] ;
264
- const startTime = '2024-08-13T10:00:00' ;
264
+ const startTime = new Date ( '2024-08-13T10:00:00' ) ;
265
265
const result = updateDaySinceDeparture ( TimesStopsInputRows , startTime , {
266
266
keepFirstIndexArrival : true ,
267
267
} ) ;
@@ -303,7 +303,7 @@ describe('updateDaySinceDeparture', () => {
303
303
arrival : { time : '01:00:00' } ,
304
304
} ,
305
305
] as TimesStopsInputRow [ ] ;
306
- const startTime = '2024-08-13T00:00:00' ;
306
+ const startTime = new Date ( '2024-08-13T00:00:00' ) ;
307
307
const result = updateDaySinceDeparture ( pathWaypointRows , startTime , {
308
308
keepFirstIndexArrival : true ,
309
309
} ) ;
@@ -346,7 +346,7 @@ describe('updateDaySinceDeparture', () => {
346
346
arrival : { time : '00:30:00' } ,
347
347
} ,
348
348
] as TimesStopsInputRow [ ] ;
349
- const startTime = '2024-08-13T23:50:00' ;
349
+ const startTime = new Date ( '2024-08-13T23:50:00' ) ;
350
350
const result = updateDaySinceDeparture ( TimesStopsInputRows , startTime , {
351
351
keepFirstIndexArrival : true ,
352
352
} ) ;
@@ -387,7 +387,7 @@ describe('updateDaySinceDeparture', () => {
387
387
arrival : { time : '00:00:00' } ,
388
388
} ,
389
389
] as TimesStopsInputRow [ ] ;
390
- const startTime = '2024-08-13T23:50:00' ;
390
+ const startTime = new Date ( '2024-08-13T23:50:00' ) ;
391
391
const result = updateDaySinceDeparture ( pathWaypointRows , startTime , {
392
392
keepFirstIndexArrival : true ,
393
393
} ) ;
@@ -435,7 +435,7 @@ describe('updateDaySinceDeparture', () => {
435
435
arrival : { time : '01:30:00' } ,
436
436
} ,
437
437
] as TimesStopsInputRow [ ] ;
438
- const startTime = '2024-08-13T23:45:00' ;
438
+ const startTime = new Date ( '2024-08-13T23:45:00' ) ;
439
439
const result = updateDaySinceDeparture ( pathWaypointRows , startTime , {
440
440
keepFirstIndexArrival : true ,
441
441
} ) ;
@@ -498,7 +498,7 @@ describe('updateDaySinceDeparture', () => {
498
498
arrival : { time : '00:50:00' } ,
499
499
} ,
500
500
] as TimesStopsInputRow [ ] ;
501
- const startTime = '2024-08-13T23:50:00' ;
501
+ const startTime = new Date ( '2024-08-13T23:50:00' ) ;
502
502
const result = updateDaySinceDeparture ( TimesStopsInputRows , startTime , {
503
503
keepFirstIndexArrival : true ,
504
504
} ) ;
@@ -563,7 +563,7 @@ describe('updateDaySinceDeparture', () => {
563
563
arrival : { time : '00:56:00' } ,
564
564
} ,
565
565
] as TimesStopsInputRow [ ] ;
566
- const startTime = '2024-08-13T23:50:00' ;
566
+ const startTime = new Date ( '2024-08-13T23:50:00' ) ;
567
567
const result = updateDaySinceDeparture ( TimesStopsInputRows , startTime , {
568
568
keepFirstIndexArrival : true ,
569
569
} ) ;
@@ -643,7 +643,7 @@ describe('updateDaySinceDeparture', () => {
643
643
stopFor : '3600' ,
644
644
} ,
645
645
] as TimesStopsInputRow [ ] ;
646
- const startTime = '2024-08-13T23:50:00' ;
646
+ const startTime = new Date ( '2024-08-13T23:50:00' ) ;
647
647
const result = updateDaySinceDeparture ( TimesStopsInputRows , startTime , {
648
648
keepFirstIndexArrival : true ,
649
649
} ) ;
@@ -750,7 +750,7 @@ describe('updateDaySinceDeparture', () => {
750
750
} ,
751
751
] as TimesStopsInputRow [ ] ;
752
752
753
- const startTime = '2024-08-13T23:45:00' ;
753
+ const startTime = new Date ( '2024-08-13T23:45:00' ) ;
754
754
const result = updateDaySinceDeparture ( pathWaypointRows , startTime , {
755
755
keepFirstIndexArrival : true ,
756
756
} ) ;
@@ -812,7 +812,7 @@ describe('updateDaySinceDeparture', () => {
812
812
813
813
describe ( 'durationSinceStartTime' , ( ) => {
814
814
it ( 'should return the correct duration' , ( ) => {
815
- const startTime = '2023-09-01T10:00:00Z' ;
815
+ const startTime = new Date ( '2023-09-01T10:00:00Z' ) ;
816
816
const stepTimeDays = {
817
817
time : '20:00:00' ,
818
818
daySinceDeparture : 0 ,
@@ -824,7 +824,7 @@ describe('durationSinceStartTime', () => {
824
824
} ) ;
825
825
826
826
it ( 'should return the correct duration. daySinceDeparture 1' , ( ) => {
827
- const startTime = '2023-09-01T10:00:00Z' ;
827
+ const startTime = new Date ( '2023-09-01T10:00:00Z' ) ;
828
828
const stepTimeDays = {
829
829
time : '11:00:00' ,
830
830
daySinceDeparture : 1 ,
@@ -838,7 +838,7 @@ describe('durationSinceStartTime', () => {
838
838
839
839
describe ( 'calculateStepTimeDays' , ( ) => {
840
840
it ( 'should return correct time and daySinceDeparture' , ( ) => {
841
- const startTime = '2023-09-01T10:00:00Z' ;
841
+ const startTime = new Date ( '2023-09-01T10:00:00Z' ) ;
842
842
const isoDuration = 'PT36000S' ; // 10 hours
843
843
844
844
const result = calculateStepTimeAndDays ( startTime , isoDuration ) ;
@@ -850,7 +850,7 @@ describe('calculateStepTimeDays', () => {
850
850
} ) ;
851
851
852
852
it ( 'should return correct time and daySinceDeparture, daySinceDeparture 1' , ( ) => {
853
- const startTime = '2023-09-01T10:00:00Z' ;
853
+ const startTime = new Date ( '2023-09-01T10:00:00Z' ) ;
854
854
const isoDuration = 'PT122400S' ; // 1 day 10 hours
855
855
856
856
const result = calculateStepTimeAndDays ( startTime , isoDuration ) ;
0 commit comments