Skip to content

Commit

Permalink
Add spec docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jedel1043 committed Nov 11, 2022
1 parent 72d7436 commit fa700c7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions boa_engine/src/builtins/date/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ impl Date {
/// [spec]: https://tc39.es/ecma262/#sec-timeclip
#[inline]
pub fn time_clip(time: f64) -> Option<i64> {
// 1. If time is not finite, return NaN.
// 2. If abs(ℝ(time)) > 8.64 × 1015, return NaN.
// 3. Return 𝔽(! ToIntegerOrInfinity(time)).
if time.is_nan() {
return None;
}
Expand Down

0 comments on commit fa700c7

Please sign in to comment.