2016-07-14 11:31:08 +00:00
|
|
|
// Copyright 2016 the V8 project authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
2016-07-14 12:29:50 +00:00
|
|
|
if (this.Intl) {
|
|
|
|
assertThrows("Intl.DateTimeFormat('en-US', {timeZone: 0})", RangeError);
|
|
|
|
assertThrows("Intl.DateTimeFormat('en-US', {timeZone: true})", RangeError);
|
|
|
|
assertThrows("Intl.DateTimeFormat('en-US', {timeZone: null})", RangeError);
|
2016-07-14 11:31:08 +00:00
|
|
|
|
2016-07-14 12:29:50 +00:00
|
|
|
var object = { toString: function() { return "UTC" } };
|
|
|
|
assertDoesNotThrow("Intl.DateTimeFormat('en-US', {timeZone: object})");
|
|
|
|
}
|