Fixed expiration comparison (#17)

The comparison now forces the comparison on dates, excluding times
This commit is contained in:
Daniel J. Summers
2019-06-13 22:01:08 -05:00
parent 7d0e1484ba
commit 0748ad6ce8
7 changed files with 32 additions and 23 deletions

View File

@@ -545,13 +545,13 @@ and [<CLIMutable; NoComparison; NoEquality>] PrayerRequest =
match this.requestType with
| LongTermRequest
| Expecting -> false
| _ -> curr.AddDays(-(float expDays)) > this.updatedDate // Automatic expiration
| _ -> curr.AddDays(-(float expDays)).Date > this.updatedDate.Date // Automatic expiration
/// Is an update required for this long-term request?
member this.updateRequired curr expDays updWeeks =
match this.isExpired curr expDays with
| true -> false
| false -> curr.AddDays(-(float (updWeeks * 7))) > this.updatedDate
| false -> curr.AddDays(-(float (updWeeks * 7))).Date > this.updatedDate.Date
/// Configure EF for this entity
static member internal configureEF (mb : ModelBuilder) =

View File

@@ -2,9 +2,9 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyVersion>7.3.1.0</AssemblyVersion>
<FileVersion>7.3.1.0</FileVersion>
<Version>7.3.1</Version>
<AssemblyVersion>7.3.2.0</AssemblyVersion>
<FileVersion>7.3.2.0</FileVersion>
<Version>7.3.2</Version>
</PropertyGroup>
<ItemGroup>