Skip to content

Fix gtfs_day_type dropping the holes of ValidDayBits - #195

Merged
skinkie merged 1 commit into
MMTIS:binary_relation_serializerfrom
deryclem:fix-daytype-valid-day-bits
Oct 21, 2026
Merged

skinkie merged 1 commit into
MMTIS:binary_relation_serializerfrom
deryclem:fix-daytype-valid-day-bits

Conversation

@deryclem

Copy link
Copy Markdown
Contributor

The ValidDayBits of a period were never turned into added/removed dates when the DayType has days of week, so calendar_dates.txt came out empty. The period loop rewrote the assignment reference in place, so the bits loop never recognised it.

Checked on Trenitalia's and Italo's NeTEx, both from the Italian NAP: with Trenitalia the service days of all 17613 services now match the bits, and Italo's output is unchanged.

When a DayType has days of week, the ValidDayBits of its period were never
turned into added/removed dates: the period loop rewrote the assignment
reference in place, so the bits loop no longer recognised it. Also fixes
an inverted EVERYDAY check and a dt.date() call on a date.
deryclem added a commit to deryclem/trenitalia-gtfs that referenced this pull request Oct 20, 2026
Points vendor/badger at deryclem/badger fix-daytype-valid-day-bits
(MMTIS/badger#195) so calendar_dates.txt is generated. Refs #1.
Switch back to MMTIS/badger once the PR is merged.
@skinkie
skinkie self-requested a review October 21, 2026 06:29
@skinkie skinkie self-assigned this Oct 21, 2026
@skinkie

skinkie commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Thanks!

@skinkie
skinkie merged commit b19000c into MMTIS:binary_relation_serializer Oct 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants