js/src/jit-test/tests/auto-regress/bug687099.js

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 // Binary: cache/js-dbg-64-94ceb173baed-linux
michael@0 2 // Flags: -m -n -a
michael@0 3 //
michael@0 4
michael@0 5 gczeal(2);
michael@0 6 function iso(d) {
michael@0 7 return new Date(d).toISOString();
michael@0 8 }
michael@0 9 function check(s, millis){
michael@0 10 description = "Date.parse('"+s+"') == '"+iso(millis)+"'";
michael@0 11 }
michael@0 12 function dd(year, month, day, hour, minute, second, millis){
michael@0 13 return Date.UTC(year, month-1, day, hour, minute, second, millis);
michael@0 14 }
michael@0 15 function TZAtDate(d){
michael@0 16 return d.getTimezoneOffset() * 60000;
michael@0 17 }
michael@0 18 function TZInMonth(month){
michael@0 19 return TZAtDate(new Date(dd(2009,month,1,0,0,0,0)));
michael@0 20 }
michael@0 21 JulTZ = TZInMonth(7);
michael@0 22 check("2009-07-23T19:53:21.001+12:00", dd(2009,7,23,7,53,21,1));
michael@0 23 check("2009-07-23T19:53:21+12:00", dd(2009,7,23,7,53,21,0));
michael@0 24 check("2009-07-23T19:53+12:00", dd(2009,7,23,7,53,0,0));
michael@0 25 check("2009-07T19:53:21.001", dd(2009,0Xe ,1,19,53,21,1)+JulTZ);
michael@0 26 check("2009-07T19:53:21", dd(2009,7,1,19,53,21,0)+JulTZ);
michael@0 27 check("2009-07T19:53", dd(2009,7,1,19,53,0,0)+JulTZ);
michael@0 28 check("2009-07-23T19:53:21.001+12:00", dd(2009,7,23,7,53,21,1));
michael@0 29 check("2009-07-23T00:00:00.000-07:00", dd(2009,7,23,7,0,0,0));
michael@0 30 check("2009-07-23T24:00:00.000-07:00", dd(2009,7,24,7,0,0,0));

mercurial