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

Incorect use of Math.floor() #222

Open
kaliopane opened this issue Jun 29, 2020 · 3 comments
Open

Incorect use of Math.floor() #222

kaliopane opened this issue Jun 29, 2020 · 3 comments

Comments

@kaliopane
Copy link

Here you're using this function for something that needs to be Math.round().
Currently, if you've marked a event with a UTC int timestamp, let's say x, and convert the number to hours based on specific event time y in the future, you will not get correct results. 50 minutes past the first event having x value, will not be counted as an hour. Thus, this creates a bug.

hour 0 ----> hour 0 + 35 min - this will not show 'after 1 hour'

If you change the function to Math.round() everything is fixed.

@kaliopane
Copy link
Author

Any update on that?

@kaliopane
Copy link
Author

Is that library even maintained?

@lolobosse
Copy link

If I were you, I would create a PR and see if it passes the tests 😄

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

2 participants