Fix off-by-one year for start date historical rail#886
Merged
Conversation
For #719. When a year is selected, all railways present at any time within that year should be shown. This behaviour was not correct for the start date of railway lines. The railway lines were only shown when a year later was selected. For example with a railway built in May 1859, it is only shown when 1860 is selected (http://localhost:8000/#view=11.39/46.3128/11.2661&date=1859) 1859: <img width="1158" height="657" alt="Image" src="https://github.com/user-attachments/assets/51581206-2a00-4b91-85b0-25f0fe63e859" /> 1860: <img width="1158" height="657" alt="Image" src="https://github.com/user-attachments/assets/92495f31-10e1-4e73-9792-1a3f04aaa3ea" /> This pull corrects the problem.
detective-fiasco
pushed a commit
to detective-fiasco/OpenRailwayMap-vector
that referenced
this pull request
Apr 8, 2026
For hiddewie#719. When a year is selected, all railways present at any time within that year should be shown. This behaviour was not correct for the start date of railway lines. The railway lines were only shown when a year later was selected. For example with a railway built in May 1859, it is only shown when 1860 is selected (http://localhost:8000/#view=11.39/46.3128/11.2661&date=1859) 1859: <img width="1158" height="657" alt="Image" src="https://github.com/user-attachments/assets/51581206-2a00-4b91-85b0-25f0fe63e859" /> 1860: <img width="1158" height="657" alt="Image" src="https://github.com/user-attachments/assets/92495f31-10e1-4e73-9792-1a3f04aaa3ea" /> This pull corrects the problem (http://localhost:8000/#view=11.39/46.3128/11.2661&date=1859): <img width="1034" height="657" alt="image" src="https://github.com/user-attachments/assets/183d25cc-07f0-4a31-bb54-684c4b8136fd" />
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For #719.
When a year is selected, all railways present at any time within that year should be shown.
This behaviour was not correct for the start date of railway lines. The railway lines were only shown when a year later was selected.
For example with a railway built in May 1859, it is only shown when 1860 is selected (http://localhost:8000/#view=11.39/46.3128/11.2661&date=1859) 1859:
1860:

This pull corrects the problem (http://localhost:8000/#view=11.39/46.3128/11.2661&date=1859):
