Example #1
0
 public static DateTime DateTimeFrom(this System.Random random, DateTime from) =>
 random.DateTime(from, from.AddYears(1));
Example #2
0
 public static DateTime DateTimeTo(this System.Random random, DateTime to) =>
 random.DateTime(to.AddYears(-1), to);
Example #3
0
 public static DateTime DateTime(this System.Random random)
 => random.DateTime(
     System.DateTime.Now.AddYears(-1),
     System.DateTime.Now.AddYears(1));