Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort trains list by departure date #14

Open
nalvarez508 opened this issue May 16, 2022 · 1 comment
Open

Sort trains list by departure date #14

nalvarez508 opened this issue May 16, 2022 · 1 comment
Assignees
Labels
backend Mainly a backend change enhancement New feature or request

Comments

@nalvarez508
Copy link
Owner

I thought this was done by default, however, it was not.
This could be done in the Train class using the departure datetimes. When the train elements are returned, maybe sort it in the receiving area, in trainResultsArea?
Would need to create a less than __lt__ and greater than __gt__ overload.

@nalvarez508 nalvarez508 added enhancement New feature or request backend Mainly a backend change labels May 16, 2022
@nalvarez508 nalvarez508 self-assigned this May 16, 2022
@nalvarez508
Copy link
Owner Author

On second thought, sorting by duration is actually more useful, I think. Spending less time on the train is valuable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Mainly a backend change enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant