Skip to content

Conversation

JamesGelok
Copy link

Not sure what would need to be coerced here, triple equals might help ensure a more accurate diff.

sample source

const date1 = new Date(Date.UTC(96, 1, 2, 3, 4, 5)); console.log(date1.valueOf()); // expected output: 823230245000 const date2 = new Date("02 Feb 1996 03:04:05 GMT"); console.log(date2.valueOf()); // expected output: 823230245000

After looking at this I'm thinking we should use triple equals here.

console.log(date1.valueOf() === date2.valueOf()); // expected output: true
Not sure what would need to be coerced here, triple equals might help ensure a more accurate diff. ```js const date1 = new Date(Date.UTC(96, 1, 2, 3, 4, 5)); console.log(date1.valueOf()); // expected output: 823230245000 const date2 = new Date("02 Feb 1996 03:04:05 GMT"); console.log(date2.valueOf()); // expected output: 823230245000 console.log(date1.valueOf() === date2.valueOf()); // expected output: true ```
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 49e6212 on JamesGelok:patch-1 into 6296889 on mattphillips:master.

@JamesGelok JamesGelok closed this by deleting the head repository Jun 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants