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
console.log('Would be correct', new Date(17338751991000)); //2024-12-10T23:59:59.000Z
console.log('Current state', new Date(17338752001000)); //2024-12-11T00:00:00.000Z
What have you tried so far?
A workaround would be to make the input validEnd + 1 day
Your Environment
software
version
react-native
~9.1.3
react-native-paper
5.12.5
node
v18.20.2
npm or yarn
10.5.0
input
can we use Math.trunc()
The text was updated successfully, but these errors were encountered:
trunc the ms instead of round to avoid edge cases where the date would be changed example:
Math.round((new Date('2024-12-10T23:59:59.999Z')).getTime() / 1000)
vs
Math.trunc((new Date('2024-12-10T23:59:59.999Z')).getTime() / 1000)
Current behaviour
dateUtils.tsx --> dateToUnix takes the initial date and modifies it wrongly because of the Math.round
Expected behaviour
The year, month and day should still be the same
How to reproduce?
console.log('Would be correct', new Date(17338751991000)); //2024-12-10T23:59:59.000Z
console.log('Current state', new Date(17338752001000)); //2024-12-11T00:00:00.000Z
What have you tried so far?
A workaround would be to make the input validEnd + 1 day
Your Environment
input
can we use Math.trunc()
The text was updated successfully, but these errors were encountered: