Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -21,15 +21,15 @@ def days_before_season(local_time:str, season:str)-> str: #it's import to specif
|
|
21 |
current_time = datetime.strptime(local_time, "%Y-%m-%d %H:%M:%S")
|
22 |
|
23 |
if season == "spring":
|
24 |
-
spring_start = datetime(2025,
|
25 |
# Calculate the difference
|
26 |
days = (spring_start - current_time).days
|
27 |
elif season == "summer":
|
28 |
-
summer_start = datetime(2025,
|
29 |
# Calculate the difference
|
30 |
days = (summer_start - current_time).days
|
31 |
elif season == "autumn":
|
32 |
-
autumn_start = datetime(2025,
|
33 |
# Calculate the difference
|
34 |
days = (autumn_start - current_time).days
|
35 |
elif season == "winter":
|
|
|
21 |
current_time = datetime.strptime(local_time, "%Y-%m-%d %H:%M:%S")
|
22 |
|
23 |
if season == "spring":
|
24 |
+
spring_start = datetime(2025, 3, 1)
|
25 |
# Calculate the difference
|
26 |
days = (spring_start - current_time).days
|
27 |
elif season == "summer":
|
28 |
+
summer_start = datetime(2025, 6, 1)
|
29 |
# Calculate the difference
|
30 |
days = (summer_start - current_time).days
|
31 |
elif season == "autumn":
|
32 |
+
autumn_start = datetime(2025, 9, 1)
|
33 |
# Calculate the difference
|
34 |
days = (autumn_start - current_time).days
|
35 |
elif season == "winter":
|