This commit is contained in:
Auric Vente 2024-03-06 19:17:12 -06:00
parent 9e224f7a89
commit 7560718473
1 changed files with 2 additions and 1 deletions

View File

@ -71,8 +71,9 @@ def random_int(min_val, max_val):
def random_date():
one_hundred = 36525
current_date = datetime.now()
end_date = current_date + timedelta(days=36525) # 365 days * 100 years
end_date = current_date + timedelta(days=(one_hundred // 2))
random_days = random.randint(0, (end_date - current_date).days)
random_date = current_date + timedelta(days=random_days)
return random_date.strftime("%d %b %Y")