Skip to content

Commit

Permalink
fix equals date
Browse files Browse the repository at this point in the history
  • Loading branch information
m0hamad-j committed Mar 22, 2024
1 parent 9579cde commit df453e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions EFSorter/EFSorter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Description>Ef soreter for IQuery</Description>
<FileVersion>2.0.2.4</FileVersion>
<Version>2.3.4</Version>
<FileVersion>2.0.2.5</FileVersion>
<Version>2.3.5</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion EFSorter/Filters/Condition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ private string MapDateCondition()
var validDate = string.IsNullOrEmpty(Value) ? DateTime.UtcNow : DateTime.Parse(Value).ToUniversalTime().Date;
return Operator switch
{
"equals" => $"{Field}.Date = DateTime({validDate.Ticks},1)",
"equals" => $"{Field} >= DateTime({validDate.Ticks},1) && {Field} <= DateTime({validDate.AddDays(1).Ticks},1)",
"notEqual" => $"{Field}.Date != DateTime({validDate.Ticks},1)",
"lessThan" => $"{Field}.Date < DateTime({validDate.Ticks},1)",
"greaterThan" => $"{Field}.Date > DateTime({validDate.Ticks},1)",
Expand Down

0 comments on commit df453e4

Please sign in to comment.