gtfs-to-html 2.9.11 → 2.9.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/index.js +11 -11
- package/dist/app/index.js.map +1 -1
- package/dist/bin/gtfs-to-html.js +11 -11
- package/dist/bin/gtfs-to-html.js.map +1 -1
- package/dist/index.js +11 -11
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/views/default/css/timetable_styles.css +45 -6
- package/views/default/formatting_functions.pug +8 -2
- package/views/default/js/timetable-map.js +169 -95
package/dist/index.js
CHANGED
|
@@ -333,7 +333,7 @@ function formatTripNameForCSV(trip, timetable) {
|
|
|
333
333
|
}
|
|
334
334
|
|
|
335
335
|
// package.json
|
|
336
|
-
var version = "2.9.
|
|
336
|
+
var version = "2.9.13";
|
|
337
337
|
|
|
338
338
|
// src/lib/utils.ts
|
|
339
339
|
var isTimepoint = (stoptime) => {
|
|
@@ -470,26 +470,26 @@ var getCalendarDatesForTimetable = (timetable, config) => {
|
|
|
470
470
|
);
|
|
471
471
|
const start = fromGTFSDate(timetable.start_date);
|
|
472
472
|
const end = fromGTFSDate(timetable.end_date);
|
|
473
|
-
const excludedDates =
|
|
474
|
-
const includedDates =
|
|
473
|
+
const excludedDates = /* @__PURE__ */ new Set();
|
|
474
|
+
const includedDates = /* @__PURE__ */ new Set();
|
|
475
475
|
for (const calendarDate of calendarDates) {
|
|
476
476
|
if (moment2(calendarDate.date, "YYYYMMDD").isBetween(start, end)) {
|
|
477
477
|
if (calendarDate.exception_type === 1) {
|
|
478
|
-
includedDates.
|
|
478
|
+
includedDates.add(formatDate(calendarDate, config.dateFormat));
|
|
479
479
|
} else if (calendarDate.exception_type === 2) {
|
|
480
|
-
excludedDates.
|
|
480
|
+
excludedDates.add(formatDate(calendarDate, config.dateFormat));
|
|
481
481
|
}
|
|
482
482
|
}
|
|
483
483
|
}
|
|
484
|
-
const includedAndExcludedDates =
|
|
485
|
-
(date) => includedDates.
|
|
484
|
+
const includedAndExcludedDates = new Set(
|
|
485
|
+
[...excludedDates].filter((date) => includedDates.has(date))
|
|
486
486
|
);
|
|
487
487
|
return {
|
|
488
|
-
excludedDates: excludedDates.filter(
|
|
489
|
-
(date) => !includedAndExcludedDates.
|
|
488
|
+
excludedDates: [...excludedDates].filter(
|
|
489
|
+
(date) => !includedAndExcludedDates.has(date)
|
|
490
490
|
),
|
|
491
|
-
includedDates: includedDates.filter(
|
|
492
|
-
(date) => !includedAndExcludedDates.
|
|
491
|
+
includedDates: [...includedDates].filter(
|
|
492
|
+
(date) => !includedAndExcludedDates.has(date)
|
|
493
493
|
)
|
|
494
494
|
};
|
|
495
495
|
};
|