Fix time examples
authorRicardo de Almeida Gonzaga <ricardo.gonzaga@intel.com>
Fri, 13 Sep 2013 17:34:05 +0000 (14:34 -0300)
committerRicardo de Almeida Gonzaga <ricardo.gonzaga@intel.com>
Fri, 13 Sep 2013 17:47:30 +0000 (14:47 -0300)
examples/time.html
time/time_api.js

index 6e55108..249f6cd 100644 (file)
@@ -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");
index 72f5adc..480613d 100644 (file)
@@ -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());