Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/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 es6id: 20.3.3.4
6 description: Time clipping
7 info: |
8 [...]
9 9. Return TimeClip(MakeDate(MakeDay(yr, m, dt), MakeTime(h, min, s, milli))).
10
11 TimeClip (time)
12
13 1. If time is not finite, return NaN.
14 2. If abs(time) > 8.64 × 1015, return NaN.
15 ---*/
16
17 assert.notSameValue(Date.UTC(275760, 8, 13, 0, 0, 0, 0), NaN);
18 assert.sameValue(Date.UTC(275760, 8, 13, 0, 0, 0, 1), NaN);