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

Minutes until departure instead of time #24

Open
toco1 opened this issue Nov 29, 2021 · 8 comments
Open

Minutes until departure instead of time #24

toco1 opened this issue Nov 29, 2021 · 8 comments
Assignees

Comments

@toco1
Copy link

toco1 commented Nov 29, 2021

It is possible to show the remaining time until departure instead/additionally to the departure time on the right-hand side of the card?

@jonkristian
Copy link
Owner

It's not something that is implemented. However it shouldn't be too hard to do. I will try and find the time to look into this.

@terjew
Copy link

terjew commented Dec 20, 2022

@jonkristian following up on this, I notice that when there are no delays, I get the text "Arrives in x minutes" below the line number. However, when there is a delay, this text is not shown and instead it shows the number of minutes delay in red on the right. Is there any way to show both?

Example below:
image

@jonkristian
Copy link
Owner

jonkristian commented Dec 20, 2022

Yes this makes sense, I will see if I can get it added along with a flag to set remaining time.

By the way, thank you so much for the coffees, highly appreciated!

@jonkristian jonkristian self-assigned this Mar 9, 2023
@jonkristian
Copy link
Owner

It is possible to show the remaining time until departure instead/additionally to the departure time on the right-hand side of the card?

@toco1 Working on a rewrite and just want to make sure I understood what you were asking, you want an option to replace the time on the right hand side with a countdown like you get via the show_human option?

@jonkristian
Copy link
Owner

@toco1 and @terjew this should now be sorted in 2.0.0-beta, sorry for the long wait 🥲 Keeping this open until it's in stable release, just wanted to let you know if you want to try it out.

@repvik
Copy link

repvik commented Jun 3, 2023

It doesn't handle midnight well:

image

@jonkristian
Copy link
Owner

jonkristian commented Jun 10, 2023

The underlying issue is that entur does not return a datetime, just time string. So I have to get creative here, I will look into how this can be improved.

@jonkristian
Copy link
Owner

@repvik Could you please test the latest from master branch and see how that works? I've rewritten human readable calculations so it should track correctly when time crosses midnight, and I've added a threshold of about 8 minutes for a "departs in..." string too.

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

No branches or pull requests

4 participants