| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // ECMAScript 402 API implementation. | 5 // ECMAScript 402 API implementation. |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Intl object is a single object that has some named properties, | 8 * Intl object is a single object that has some named properties, |
| 9 * all of which are constructors. | 9 * all of which are constructors. |
| 10 */ | 10 */ |
| (...skipping 1556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1567 timeZone: {writable: true}, | 1567 timeZone: {writable: true}, |
| 1568 timeZoneName: {writable: true}, | 1568 timeZoneName: {writable: true}, |
| 1569 tz: {value: tz, writable: true}, | 1569 tz: {value: tz, writable: true}, |
| 1570 weekday: {writable: true}, | 1570 weekday: {writable: true}, |
| 1571 year: {writable: true} | 1571 year: {writable: true} |
| 1572 }); | 1572 }); |
| 1573 | 1573 |
| 1574 var formatter = %CreateDateTimeFormat( | 1574 var formatter = %CreateDateTimeFormat( |
| 1575 requestedLocale, {skeleton: ldmlString, timeZone: tz}, resolved); | 1575 requestedLocale, {skeleton: ldmlString, timeZone: tz}, resolved); |
| 1576 | 1576 |
| 1577 if (!IS_UNDEFINED(tz) && tz !== resolved.timeZone) { | 1577 if (resolved.timeZone === "Etc/Unknown") { |
| 1578 throw MakeRangeError(kUnsupportedTimeZone, tz); | 1578 throw MakeRangeError(kUnsupportedTimeZone, tz); |
| 1579 } | 1579 } |
| 1580 | 1580 |
| 1581 %MarkAsInitializedIntlObjectOfType(dateFormat, 'dateformat', formatter); | 1581 %MarkAsInitializedIntlObjectOfType(dateFormat, 'dateformat', formatter); |
| 1582 ObjectDefineProperty(dateFormat, 'resolved', {value: resolved}); | 1582 ObjectDefineProperty(dateFormat, 'resolved', {value: resolved}); |
| 1583 | 1583 |
| 1584 return dateFormat; | 1584 return dateFormat; |
| 1585 } | 1585 } |
| 1586 | 1586 |
| 1587 | 1587 |
| (...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2113 } | 2113 } |
| 2114 | 2114 |
| 2115 var locales = %_Arguments(0); | 2115 var locales = %_Arguments(0); |
| 2116 var options = %_Arguments(1); | 2116 var options = %_Arguments(1); |
| 2117 return toLocaleDateTime( | 2117 return toLocaleDateTime( |
| 2118 this, locales, options, 'time', 'time', 'dateformattime'); | 2118 this, locales, options, 'time', 'time', 'dateformattime'); |
| 2119 } | 2119 } |
| 2120 ); | 2120 ); |
| 2121 | 2121 |
| 2122 }) | 2122 }) |
| OLD | NEW |