Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Side by Side Diff: src/js/i18n.js

Issue 1509273007: Allow ICU to normalize time zones (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Misspell shorter Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-487322.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 })
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-487322.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698