Index: src/js/i18n.js |
diff --git a/src/js/i18n.js b/src/js/i18n.js |
index 6046a6f2f9438a68c9c9c8c3f9762aae04bb826d..d2a369b64db196d86194b90996717d490549832c 100644 |
--- a/src/js/i18n.js |
+++ b/src/js/i18n.js |
@@ -29,7 +29,6 @@ var InstallGetter = utils.InstallGetter; |
var InternalArray = utils.InternalArray; |
var InternalRegExpMatch; |
var InternalRegExpReplace |
-var IsNaN; |
var ObjectHasOwnProperty = utils.ImportNow("ObjectHasOwnProperty"); |
var OverrideFunction = utils.OverrideFunction; |
var patternSymbol = utils.ImportNow("intl_pattern_symbol"); |
@@ -43,7 +42,6 @@ var StringSubstring; |
utils.Import(function(from) { |
ArrayJoin = from.ArrayJoin; |
ArrayPush = from.ArrayPush; |
- IsNaN = from.IsNaN; |
InternalRegExpMatch = from.InternalRegExpMatch; |
InternalRegExpReplace = from.InternalRegExpReplace; |
StringIndexOf = from.StringIndexOf; |
@@ -2227,7 +2225,8 @@ function toLocaleDateTime(date, locales, options, required, defaults, service) { |
throw %make_type_error(kMethodInvokedOnWrongType, "Date"); |
} |
- if (IsNaN(date)) return 'Invalid Date'; |
+ var dateValue = TO_NUMBER(date); |
+ if (NUMBER_IS_NAN(dateValue)) return 'Invalid Date'; |
var internalOptions = toDateTimeOptions(options, required, defaults); |