From 4efd530f1d9fece9d802b4eb46566f80d6cd2abb Mon Sep 17 00:00:00 2001 From: pasha-zzz Date: Sat, 23 Dec 2023 10:40:26 +0300 Subject: [PATCH] Search date intervals correction --- Program/DAO/SQLite/unit_Database_SQLite.pas | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Program/DAO/SQLite/unit_Database_SQLite.pas b/Program/DAO/SQLite/unit_Database_SQLite.pas index b14948b..2255ff0 100644 --- a/Program/DAO/SQLite/unit_Database_SQLite.pas +++ b/Program/DAO/SQLite/unit_Database_SQLite.pas @@ -603,11 +603,12 @@ procedure TBookCollection_SQLite.TBookIteratorImpl.PrepareSearchData(const Searc else case SearchCriteria.DateIdx of 0: AddToFilter('b.UpdateDate', Format('> "%s"', [FormatDateTime(DT_FORMAT, IncDay(Now, -1))]), False, FilterString); - 1: AddToFilter('b.UpdateDate', Format('> "%s"', [FormatDateTime(DT_FORMAT, IncDay(Now, -3))]), False, FilterString); - 2: AddToFilter('b.UpdateDate', Format('> "%s"', [FormatDateTime(DT_FORMAT, IncDay(Now, -7))]), False, FilterString); - 3: AddToFilter('b.UpdateDate', Format('> "%s"', [FormatDateTime(DT_FORMAT, IncDay(Now, -14))]), False, FilterString); - 4: AddToFilter('b.UpdateDate', Format('> "%s"', [FormatDateTime(DT_FORMAT, IncDay(Now, -30))]), False, FilterString); - 5: AddToFilter('b.UpdateDate', Format('> "%s"', [FormatDateTime(DT_FORMAT, IncDay(Now, -90))]), False, FilterString); + 1: AddToFilter('b.UpdateDate', Format('> "%s"', [FormatDateTime(DT_FORMAT, IncDay(Now, -2))]), False, FilterString); + 2: AddToFilter('b.UpdateDate', Format('> "%s"', [FormatDateTime(DT_FORMAT, IncDay(Now, -3))]), False, FilterString); + 3: AddToFilter('b.UpdateDate', Format('> "%s"', [FormatDateTime(DT_FORMAT, IncDay(Now, -7))]), False, FilterString); + 4: AddToFilter('b.UpdateDate', Format('> "%s"', [FormatDateTime(DT_FORMAT, IncDay(Now, -14))]), False, FilterString); + 5: AddToFilter('b.UpdateDate', Format('> "%s"', [FormatDateTime(DT_FORMAT, IncMonth(Now, -1))]), False, FilterString); + 6: AddToFilter('b.UpdateDate', Format('> "%s"', [FormatDateTime(DT_FORMAT, IncMonth(Now, -3))]), False, FilterString); end; case SearchCriteria.DownloadedIdx of