Adding utils.py file

This commit is contained in:
Ryan
2025-11-19 20:48:51 -05:00
parent f15846f3f4
commit f14b040375

16
utils.py Normal file
View File

@@ -0,0 +1,16 @@
import datetime
def date_to_epoch(date_str: str) -> float:
split_date = date_str.split("-")
date = datetime.datetime(
int(split_date[0]),
int(split_date[1]),
int(split_date[2]),
0,
0,
0,
)
return date.timestamp()