diff options
author | Piotr Dabrowski <p.dabrowski2@samsung.com> | 2013-09-06 11:40:12 +0200 |
---|---|---|
committer | Piotr Dabrowski <p.dabrowski2@samsung.com> | 2013-09-06 11:40:12 +0200 |
commit | caebbf73ea9d5d1ab685a39f64a14421eb50b14b (patch) | |
tree | eec9633fbc61e61eb87d1cc90893c528df0d5008 | |
parent | 11dffae73c8e8884476eb95c97c2500af1f60909 (diff) | |
download | EventManager-caebbf73ea9d5d1ab685a39f64a14421eb50b14b.tar.gz EventManager-caebbf73ea9d5d1ab685a39f64a14421eb50b14b.tar.bz2 EventManager-caebbf73ea9d5d1ab685a39f64a14421eb50b14b.zip |
[EventManager] updated EventManager sources
Change-Id: Ic353daaf7235a95b5a2926933b086da338b4e124
-rw-r--r-- | js/app.model.js | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/js/app.model.js b/js/app.model.js index 17257e6..91fe62c 100644 --- a/js/app.model.js +++ b/js/app.model.js @@ -95,13 +95,26 @@ var Model = function Model() { * @returns {AttributeRangeFilter} */ getStartDateFilter: function Model_getStartDateFilter(date) { - var tzDate1 = new tizen.TZDate(date.getFullYear(), date.getMonth(), date.getDate()+1), - tzDate2 = new tizen.TZDate(date.getFullYear(), date.getMonth(), date.getDate()); + var today = new tizen.TZDate(date.getFullYear(), date.getMonth(), date.getDate()), + tomorrow = new tizen.TZDate(date.getFullYear(), date.getMonth(), date.getDate()+1); return new tizen.CompositeFilter( - "INTERSECTION", + "UNION", [ - new tizen.AttributeRangeFilter("startDate", null, tzDate1), - new tizen.AttributeRangeFilter("endDate", tzDate2, null) + new tizen.CompositeFilter( + "INTERSECTION", + [ + new tizen.AttributeFilter("isAllDay", "EXACTLY", false), + new tizen.AttributeRangeFilter("startDate", null, tomorrow), + new tizen.AttributeRangeFilter("endDate", today, null) + ] + ), + new tizen.CompositeFilter( + "INTERSECTION", + [ + new tizen.AttributeFilter("isAllDay", "EXACTLY", true), + new tizen.AttributeRangeFilter("startDate", tomorrow, tomorrow), + ] + ) ] ); }, |