TimeClip_negative_zero.js (493B)
1 // Copyright (C) 2015 André Bargull. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 esid: sec-timeclip 6 description: TimeClip converts negative zero to positive zero 7 info: | 8 20.3.1.15 TimeClip (time) 9 10 ... 11 3. Return ToInteger(time) + (+0). (Adding a positive zero converts -0 to +0.) 12 es6id: 20.3.1.15 13 ---*/ 14 15 var date = new Date(-0); 16 17 assert.sameValue(date.getTime(), +0, "TimeClip does not return negative zero"); 18 19 reportCompare(0, 0);