michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* michael@0: * Any copyright is dedicated to the Public Domain. michael@0: * http://creativecommons.org/licenses/publicdomain/ michael@0: * Contributor: Bob Clary michael@0: */ michael@0: michael@0: //----------------------------------------------------------------------------- michael@0: var BUGNUMBER = 58116; michael@0: var summary = 'Compute Daylight savings time correctly regardless of year'; michael@0: var actual = ''; michael@0: var expect = ''; michael@0: var status; michael@0: michael@0: printBugNumber(BUGNUMBER); michael@0: printStatus (summary); michael@0: michael@0: expect = (new Date(2005, 7, 1).getTimezoneOffset()); michael@0: michael@0: status = summary + ' ' + inSection(1) + ' 1970-07-1 '; michael@0: actual = (new Date(1970, 7, 1).getTimezoneOffset()); michael@0: reportCompare(expect, actual, status); michael@0: michael@0: status = summary + ' ' + inSection(2) + ' 1965-07-1 '; michael@0: actual = (new Date(1965, 7, 1).getTimezoneOffset()); michael@0: reportCompare(expect, actual, status); michael@0: michael@0: status = summary + ' ' + inSection(3) + ' 0000-07-1 '; michael@0: actual = (new Date(0, 7, 1).getTimezoneOffset()); michael@0: reportCompare(expect, actual, status);