Skip to content

Commit

Permalink
Merge pull request #44 from pasha-zzz/patch-3
Browse files Browse the repository at this point in the history
Search date intervals correction
  • Loading branch information
OleksiyPenkov committed Jan 9, 2024
2 parents 7c4036f + 4efd530 commit 3618c6b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Program/DAO/SQLite/unit_Database_SQLite.pas
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3618c6b

Please sign in to comment.