This commit is contained in:
Auric Vente 2024-05-10 20:59:42 -06:00
parent c2216f8582
commit 3a8bfb3863
1 changed files with 4 additions and 3 deletions

View File

@ -11,7 +11,6 @@ import random
from bs4 import BeautifulSoup from bs4 import BeautifulSoup
from datetime import datetime, timedelta from datetime import datetime, timedelta
from pathlib import Path from pathlib import Path
import aiofiles
import sys import sys
import tempfile import tempfile
@ -76,8 +75,10 @@ def random_int(min_val, max_val):
def random_date(): def random_date():
start_date = datetime.now() - timedelta(years=2) two_years = 730
end_date = start_date + timedelta(years=12) twelve_years = 4380
start_date = datetime.now() - timedelta(days=two_years)
end_date = start_date + timedelta(days=(twelve_years))
random_days = random.randint(0, (end_date - start_date).days) random_days = random.randint(0, (end_date - start_date).days)
random_date = start_date + timedelta(days=random_days) random_date = start_date + timedelta(days=random_days)
return random_date.strftime("%d %b %Y") return random_date.strftime("%d %b %Y")