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/bin/gtfs-to-html.js
CHANGED
|
@@ -330,7 +330,7 @@ function formatTripNameForCSV(trip, timetable) {
|
|
|
330
330
|
}
|
|
331
331
|
|
|
332
332
|
// package.json
|
|
333
|
-
var version = "2.9.
|
|
333
|
+
var version = "2.9.13";
|
|
334
334
|
|
|
335
335
|
// src/lib/utils.ts
|
|
336
336
|
var isTimepoint = (stoptime) => {
|
|
@@ -467,26 +467,26 @@ var getCalendarDatesForTimetable = (timetable, config) => {
|
|
|
467
467
|
);
|
|
468
468
|
const start = fromGTFSDate(timetable.start_date);
|
|
469
469
|
const end = fromGTFSDate(timetable.end_date);
|
|
470
|
-
const excludedDates =
|
|
471
|
-
const includedDates =
|
|
470
|
+
const excludedDates = /* @__PURE__ */ new Set();
|
|
471
|
+
const includedDates = /* @__PURE__ */ new Set();
|
|
472
472
|
for (const calendarDate of calendarDates) {
|
|
473
473
|
if (moment2(calendarDate.date, "YYYYMMDD").isBetween(start, end)) {
|
|
474
474
|
if (calendarDate.exception_type === 1) {
|
|
475
|
-
includedDates.
|
|
475
|
+
includedDates.add(formatDate(calendarDate, config.dateFormat));
|
|
476
476
|
} else if (calendarDate.exception_type === 2) {
|
|
477
|
-
excludedDates.
|
|
477
|
+
excludedDates.add(formatDate(calendarDate, config.dateFormat));
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
480
|
}
|
|
481
|
-
const includedAndExcludedDates =
|
|
482
|
-
(date) => includedDates.
|
|
481
|
+
const includedAndExcludedDates = new Set(
|
|
482
|
+
[...excludedDates].filter((date) => includedDates.has(date))
|
|
483
483
|
);
|
|
484
484
|
return {
|
|
485
|
-
excludedDates: excludedDates.filter(
|
|
486
|
-
(date) => !includedAndExcludedDates.
|
|
485
|
+
excludedDates: [...excludedDates].filter(
|
|
486
|
+
(date) => !includedAndExcludedDates.has(date)
|
|
487
487
|
),
|
|
488
|
-
includedDates: includedDates.filter(
|
|
489
|
-
(date) => !includedAndExcludedDates.
|
|
488
|
+
includedDates: [...includedDates].filter(
|
|
489
|
+
(date) => !includedAndExcludedDates.has(date)
|
|
490
490
|
)
|
|
491
491
|
};
|
|
492
492
|
};
|