You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's not related to browser version, but something odd going on around T=0 (and maybe other times?). I can repro like this:
store calculateProperTime on window.calculateProperTime (debugger stuff)
ran calculateProperTime(4) ; extendedTimer.textContent in console
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.
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); )
The year bit jumps around a lot :)
The text was updated successfully, but these errors were encountered: