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

Clock is messed up now that ie is dead #88

Open
connorjclark opened this issue Jun 15, 2022 · 3 comments
Open

Clock is messed up now that ie is dead #88

connorjclark opened this issue Jun 15, 2022 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@connorjclark
Copy link

The year bit jumps around a lot :)

@gabLaroche gabLaroche added the question Further information is requested label Jun 16, 2022
@gabLaroche
Copy link
Owner

I can't replicate the issue, can you provide the following: a Screenshot / screen share video, your browser + browser version please.

@connorjclark
Copy link
Author

connorjclark commented Jun 16, 2022

It's not related to browser version, but something odd going on around T=0 (and maybe other times?). I can repro like this:

  1. store calculateProperTime on window.calculateProperTime (debugger stuff)
  2. ran calculateProperTime(4) ; extendedTimer.textContent in console

image

The issue is that parseInt seems to be unnecessary in most places (or all?) it is being used, since the inputs are numbers and not strings. If you want to round to an int than Math.floor is what you want.

image

image

That's because parseInt will coerce the input into a string first, and then run the string parsing algorithm.

(also other places, like let timeRemaining = parseInt((endDate - startDate) / 1000); and let timeSince = parseInt((startDate - endDate) / 1000); )

@gabLaroche gabLaroche added bug Something isn't working and removed question Further information is requested labels Jun 16, 2022
@gabLaroche
Copy link
Owner

Thank you for the additional information, I'll look into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants