From: Ricardo de Almeida Gonzaga Date: Fri, 13 Sep 2013 17:34:05 +0000 (-0300) Subject: Fix time examples X-Git-Tag: accepted/tizen/generic/20140324.124941~150^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=07e376841ee1107ef71546ad3b7ea36f4def0c58;p=platform%2Fframework%2Fweb%2Ftizen-extensions-crosswalk.git Fix time examples --- diff --git a/examples/time.html b/examples/time.html index 6e55108..249f6cd 100644 --- a/examples/time.html +++ b/examples/time.html @@ -49,8 +49,8 @@ shouldBe("day_after_tomorrow.equalsTo(tomorrow_plus_one_day)", "true"); shouldBe("day_after_tomorrow.earlierThan(tomorrow_plus_one_day)", "false"); shouldBe("day_after_tomorrow.laterThan(tomorrow_plus_one_day)", "false"); -shouldBe("tomorrow.laterThan(now)", "false"); -shouldBe("tomorrow.earlierThan(now)", "true"); +shouldBe("tomorrow.laterThan(now)", "true"); +shouldBe("tomorrow.earlierThan(now)", "false"); shouldBe("tomorrow.equalsTo(now)", "false"); shouldBe("yesterday.equalsTo(now)", "false"); diff --git a/time/time_api.js b/time/time_api.js index 72f5adc..480613d 100644 --- a/time/time_api.js +++ b/time/time_api.js @@ -221,7 +221,7 @@ tizen.TZDate = (function() { }, addDuration: function(duration) { var date = new TZDate(date_.getFullYear(), date_.getMonth(), - date_.getDay(), date_.getHours(), date_.getMinutes(), + date_.getDate(), date_.getHours(), date_.getMinutes(), date_.getSeconds(), date_.getMilliseconds(), timezone_); date.setMilliseconds(duration.getMilliseconds() + date.getMilliseconds());