Skip to content

Commit

Permalink
Allow Date object to store invalid NativeDateTime (#2861)
Browse files Browse the repository at this point in the history
Part of ES5. 

This PR allows `Date` objects to store an invalid `NativeDateTime` as a `i64` and check when `getMinutes` (or other methods) call and check if it's valid, like in the spec

This was failing some `Date` tests, when calling `new Date(8.64e15)` then calling `getTime()` it was returning `NaN` when it should return the passed value `8640000000000000` (as node does)
  • Loading branch information
HalidOdat committed Apr 23, 2023
1 parent 31bc679 commit 72866e2
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 70 deletions.
Loading

0 comments on commit 72866e2

Please sign in to comment.