Update src/client/types/wrapper.ts
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
1814a8a87d
commit
92032f60e9
@ -4,7 +4,7 @@ const date_day_diff = (d0: Date, d1: Date): number =>
|
||||
(d1.getTime() - d0.getTime()) / (1000 * 60 * 60 * 24)
|
||||
|
||||
class journey_wrapper {
|
||||
id: string
|
||||
id: String
|
||||
data: journey = journey_template;
|
||||
sel_leg: number = 0;
|
||||
sel_day: number = 0;
|
||||
@ -82,9 +82,7 @@ class journey_wrapper {
|
||||
let leg = this.leg_get()
|
||||
if (!leg.date_range)
|
||||
return "?";
|
||||
var date = new Date(
|
||||
leg.date_range[0],
|
||||
);
|
||||
var date = new Date(leg.date_range[0]);
|
||||
date.setDate(date.getDate() + this.sel_day);
|
||||
return date.toLocal();
|
||||
}
|
||||
@ -92,7 +90,7 @@ class journey_wrapper {
|
||||
if (this.leg_count() == 0) return "";
|
||||
let lf = this.leg_first(), ll = this.leg_last();
|
||||
if (lf.date_range && ll.date_range)
|
||||
return `${lf.date_range[0].toLocal()} - ${ll[1].toLocal()}`;
|
||||
return `${lf.date_range[0].toLocal()} - ${ll.date_range[1].toLocal()}`;
|
||||
return "?";
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user