mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-27 06:20:25 +00:00
Behavior tweaks
This commit is contained in:
parent
f25a7c7cf2
commit
770f7584c9
1 changed files with 4 additions and 3 deletions
|
@ -23,7 +23,7 @@ namespace PKHeX.Core
|
|||
}
|
||||
}
|
||||
|
||||
private static string GetDateString(int time) => GetDate(time).ToString("yyyy.MM.dd");
|
||||
private static string GetDateString(int time) => time == 0 ? "X" : GetDate(time).ToString("yyyy.MM.dd");
|
||||
|
||||
private static DateTime GetDate(int time)
|
||||
{
|
||||
|
@ -82,8 +82,9 @@ namespace PKHeX.Core
|
|||
return End == 0 ? DateTime.Now : GetDate(End);
|
||||
|
||||
var end = Math.Max(Start, End);
|
||||
var stamp = Start + Util.Rand.Next(0, Start - end + 1);
|
||||
return GetDate(stamp);
|
||||
var delta = end - Start;
|
||||
var bias = Util.Rand.Next(0, delta + 1);
|
||||
return GetDate(Start).AddDays(bias);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue