From 949b448c85e43d95ec1773c04293e0515514379c Mon Sep 17 00:00:00 2001 From: Isaac Cambron Date: Mon, 16 Sep 2013 21:31:36 -0400 Subject: [PATCH] using NaN instead of 0 --- moment.js | 2 +- test/moment/invalid.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/moment.js b/moment.js index 8d12ac424..8651751c1 100644 --- a/moment.js +++ b/moment.js @@ -1209,7 +1209,7 @@ }; moment.invalid = function () { - var m = moment.utc(0); + var m = moment.utc(NaN); m._isValid = false; return m; }; diff --git a/test/moment/invalid.js b/test/moment/invalid.js index 0521c0d36..be764c37f 100644 --- a/test/moment/invalid.js +++ b/test/moment/invalid.js @@ -4,7 +4,7 @@ exports.invalid = { "invalid" : function (test) { var m = moment.invalid(); test.equals(m.isValid(), false); - test.equals(m.valueOf(), new Date(0).valueOf()); + test.ok(isNaN(m.valueOf())); test.done(); } }; -- 2.47.2