Change BP_HISTORY_DATE_LAST_MONTH to include history items between 04/59604/1 accepted/tizen/ivi/20160218.083934 accepted/tizen/mobile/20160218.005952 accepted/tizen/tv/20160218.010012 accepted/tizen/wearable/20160218.010029 submit/tizen/20160217.225721 submit/tizen_common/20160218.142243
authorsungwon2.han <sungwon2.han@samsung.com>
Tue, 16 Feb 2016 22:51:37 +0000 (07:51 +0900)
committersungwon2.han <sungwon2.han@samsung.com>
Tue, 16 Feb 2016 22:51:37 +0000 (07:51 +0900)
-7 day and -1 month.

Change-Id: I251c2d0616cabdb6450d14561acc3f4d36476acd

provider/browser-provider-history.c

index 2e20fa93b4c985bb3c19801cf84b411898debbf5..8331ad64f1e4fbd09c15e9b455820a837d94a3c7 100755 (executable)
@@ -55,11 +55,11 @@ static char *__bp_history_get_date_query(int is_deleted, bp_history_date_defs da
                                checkcolumn, checkcolumn);
        } else if (date_type == BP_HISTORY_DATE_LAST_MONTH) {
                date_cond =
-                       sqlite3_mprintf("DATE(%s) <= DATE('now','-1 months') AND DATE(%s) > DATE('now', '-2 months')",
+                       sqlite3_mprintf("DATE(%s) <= DATE('now','-7 days') AND DATE(%s) > DATE('now', '-1 months')",
                                checkcolumn, checkcolumn);
        } else if (date_type == BP_HISTORY_DATE_OLDER) {
                date_cond =
-                       sqlite3_mprintf("DATE(%s) <= DATE('now', '-2 months')",
+                       sqlite3_mprintf("DATE(%s) <= DATE('now', '-1 months')",
                                checkcolumn);
        }