mirror of
https://github.com/Tribufu/ServerManagers
synced 2026-08-12 06:01:06 +00:00
asm: update NewYear to nullable value
This commit is contained in:
parent
70ed633bc0
commit
a14ee7c108
4 changed files with 32 additions and 33 deletions
|
|
@ -23,17 +23,16 @@ namespace ServerManagerTool.Common.ValidationRules
|
|||
return new ValidationResult(false, "Invalid Date. Date must be formatted as yyyy.mm.dd hh:mm:ss");
|
||||
}
|
||||
|
||||
if (datetime.ToUniversalTime() <= MinUnixDate)
|
||||
if (datetime.ToUniversalTime() < MinUnixDate)
|
||||
{
|
||||
return new ValidationResult(false, $"Invalid Date. The Date must be after {MinUnixDate.ToLocalTime().ToString("yyyy.MM.dd HH:mm:ss")}");
|
||||
}
|
||||
|
||||
if (datetime.ToUniversalTime() >= MaxUnixDate)
|
||||
if (datetime.ToUniversalTime() > MaxUnixDate)
|
||||
{
|
||||
return new ValidationResult(false, $"Invalid Date. The Date must be before {MaxUnixDate.ToLocalTime().ToString("yyyy.MM.dd HH:mm:ss")}");
|
||||
}
|
||||
|
||||
|
||||
return new ValidationResult(true, null);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue