Spaces:
Runtime error
Runtime error
Luis
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,8 +18,12 @@ def time_left_for_event(arg1:str, arg2:int)-> str: #it's import to specify the r
|
|
| 18 |
arg1: the event name
|
| 19 |
arg2: the day of that event in calendar time
|
| 20 |
"""
|
| 21 |
-
|
| 22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
|
| 25 |
|
|
|
|
| 18 |
arg1: the event name
|
| 19 |
arg2: the day of that event in calendar time
|
| 20 |
"""
|
| 21 |
+
|
| 22 |
+
try:
|
| 23 |
+
local_time = datetime.datetime.now()
|
| 24 |
+
future_time = datetime.datetime(arg2)
|
| 25 |
+
time_between = local_time - future_time
|
| 26 |
+
return f"there are {time_between} before the {arg1}"
|
| 27 |
|
| 28 |
|
| 29 |
|