randomDate function
Implementation
DateTime randomDate() {
// Random max must be in range 0 < max <= 2^32.
// So we have to generate the time in seconds and then convert to milliseconds.
return DateTime.fromMillisecondsSinceEpoch(
randomInteger(0, 1735689600) * 1000);
}