Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -20,7 +20,12 @@ end_date = st.date_input("End Date", value=datetime.today())
|
|
| 20 |
|
| 21 |
if start_date and end_date:
|
| 22 |
if start_date <= end_date:
|
| 23 |
-
|
| 24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
else:
|
| 26 |
st.error("Start date must be before or equal to end date.")
|
|
|
|
| 20 |
|
| 21 |
if start_date and end_date:
|
| 22 |
if start_date <= end_date:
|
| 23 |
+
working_days = calculate_working_days(start_date, end_date)
|
| 24 |
+
full_weeks = working_days // 5
|
| 25 |
+
remaining_days = working_days % 5
|
| 26 |
+
|
| 27 |
+
st.success(f"""🗓️ **Working Days: {working_days}**
|
| 28 |
+
|
| 29 |
+
📆 Which is approximately **{full_weeks} week(s)** and **{remaining_days} day(s)**""")
|
| 30 |
else:
|
| 31 |
st.error("Start date must be before or equal to end date.")
|