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

Unified Diff: src/extensions/i18n/date-format.js

Issue 22715004: Version 3.20.15 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Add TypedArray API and correctness patches r16033 and r16084 Created 7 years, 4 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/extensions/i18n/date-format.cc ('k') | src/extensions/i18n/i18n-extension.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/extensions/i18n/date-format.js
diff --git a/src/extensions/i18n/date-format.js b/src/extensions/i18n/date-format.js
index b1d28e535cd0010a2b523df8c4cb54da631c20c4..04e7a7c7b9d34e50c4ec34bf2ec1e3966534c0b6 100644
--- a/src/extensions/i18n/date-format.js
+++ b/src/extensions/i18n/date-format.js
@@ -235,6 +235,7 @@ function toDateTimeOptions(options, required, defaults) {
* Useful for subclassing.
*/
function initializeDateTimeFormat(dateFormat, locales, options) {
+ native function NativeJSCreateDateTimeFormat();
if (dateFormat.hasOwnProperty('__initializedIntlObject')) {
throw new TypeError('Trying to re-initialize DateTimeFormat object.');
@@ -291,7 +292,7 @@ function initializeDateTimeFormat(dateFormat, locales, options) {
year: {writable: true}
});
- var formatter = %CreateDateTimeFormat(
+ var formatter = NativeJSCreateDateTimeFormat(
requestedLocale, {skeleton: ldmlString, timeZone: tz}, resolved);
if (tz !== undefined && tz !== resolved.timeZone) {
@@ -408,6 +409,8 @@ function initializeDateTimeFormat(dateFormat, locales, options) {
* DateTimeFormat.
*/
function formatDate(formatter, dateValue) {
+ native function NativeJSInternalDateFormat();
+
var dateMs;
if (dateValue === undefined) {
dateMs = Date.now();
@@ -419,7 +422,7 @@ function formatDate(formatter, dateValue) {
throw new RangeError('Provided date is not in valid range.');
}
- return %InternalDateFormat(formatter.formatter, new Date(dateMs));
+ return NativeJSInternalDateFormat(formatter.formatter, new Date(dateMs));
}
@@ -430,7 +433,8 @@ function formatDate(formatter, dateValue) {
* Returns undefined if date string cannot be parsed.
*/
function parseDate(formatter, value) {
- return %InternalDateParse(formatter.formatter, String(value));
+ native function NativeJSInternalDateParse();
+ return NativeJSInternalDateParse(formatter.formatter, String(value));
}
« no previous file with comments | « src/extensions/i18n/date-format.cc ('k') | src/extensions/i18n/i18n-extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698