Add date to compare date range
This commit is contained in:
parent
38db4ed802
commit
89d4d677de
1 changed files with 1 additions and 1 deletions
|
|
@ -14,7 +14,7 @@ namespace BMA.EHR.Domain.Extensions
|
||||||
|
|
||||||
public static int DiffDay(this DateTime startDate, DateTime endDate)
|
public static int DiffDay(this DateTime startDate, DateTime endDate)
|
||||||
{
|
{
|
||||||
if (endDate < startDate)
|
if (endDate.Date < startDate.Date)
|
||||||
{
|
{
|
||||||
throw new ArgumentException("End Date must greater than start date.");
|
throw new ArgumentException("End Date must greater than start date.");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue