Debian Codegraph @

js/src/tests/test262/built-ins/Date/UTC/time-clip.js

raw
1 // Copyright (C) 2016 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3 /*---
4 esid: sec-date.utc
5 description: Time clipping
6 info: |
7 [...]
8 9. Return TimeClip(MakeDate(MakeDay(yr, m, dt), MakeTime(h, min, s, milli))).
9
10 TimeClip (time)
11
12 1. If time is not finite, return NaN.
13 2. If abs(time) > 8.64 × 1015, return NaN.
14 ---*/
15
16 assert.notSameValue(Date.UTC(275760, 8, 13, 0, 0, 0, 0), NaN);
17 assert.sameValue(Date.UTC(275760, 8, 13, 0, 0, 0, 1), NaN);
18
19 reportCompare(0, 0);