Skip to content

Fix off-by-one year for start date historical rail#886

Merged
hiddewie merged 1 commit intomasterfrom
fix-start-date-historical-rail
Apr 4, 2026
Merged

Fix off-by-one year for start date historical rail#886
hiddewie merged 1 commit intomasterfrom
fix-start-date-historical-rail

Conversation

@hiddewie
Copy link
Copy Markdown
Owner

@hiddewie hiddewie commented Apr 4, 2026

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:
Image 1860:
Image

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

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.
@hiddewie hiddewie marked this pull request as ready for review April 4, 2026 20:56
@hiddewie hiddewie merged commit 185832f into master Apr 4, 2026
2 checks passed
@hiddewie hiddewie deleted the fix-start-date-historical-rail branch April 4, 2026 21:12
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"
/>
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.

1 participant