This commit is contained in:
Auric Vente 2024-05-10 20:54:09 -06:00
parent 641106553e
commit c2216f8582
1 changed files with 4 additions and 5 deletions

View File

@ -76,11 +76,10 @@ def random_int(min_val, max_val):
def random_date(): def random_date():
one_hundred = 36525 start_date = datetime.now() - timedelta(years=2)
current_date = datetime.now() end_date = start_date + timedelta(years=12)
end_date = current_date + timedelta(days=(one_hundred // 2)) random_days = random.randint(0, (end_date - start_date).days)
random_days = random.randint(0, (end_date - current_date).days) random_date = start_date + timedelta(days=random_days)
random_date = current_date + timedelta(days=random_days)
return random_date.strftime("%d %b %Y") return random_date.strftime("%d %b %Y")