mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-07-17 13:41:24 -05:00
Move tolerance permissions to pget
This commit is contained in:
parent
21669d3f77
commit
1bde155c4d
|
|
@ -55,15 +55,11 @@ private static DateTime GetDate(int time)
|
|||
|
||||
public bool IsWithinStartEnd(int stamp)
|
||||
{
|
||||
// Events are in UTC, but time zones exist (and delayed captures too).
|
||||
// Allow an extra day past the end date.
|
||||
const int tolerance = 1;
|
||||
|
||||
if (End == 0)
|
||||
return Start <= stamp && GetDate(stamp) <= DateTime.Now.AddDays(tolerance);
|
||||
return Start <= stamp && GetDate(stamp) <= DateTime.Now;
|
||||
if (Start == 0)
|
||||
return stamp <= End + tolerance;
|
||||
return Start <= stamp && stamp <= End + tolerance;
|
||||
return stamp <= End;
|
||||
return Start <= stamp && stamp <= End;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user