adjust after trip, likely end mid Sept?
This commit is contained in:
@@ -16,14 +16,14 @@ def count_business_days(start_date, end_date):
|
||||
|
||||
# Get the current date and the target date
|
||||
now = datetime.now()
|
||||
target_date = datetime(now.year, 4, 8)
|
||||
target_date = datetime(now.year, 9, 17)
|
||||
|
||||
# Adjust the target year if April 8 is in the next year
|
||||
# Adjust the target year if Sept 17 is in the next year
|
||||
if now > target_date:
|
||||
target_date = target_date.replace(year=now.year + 1)
|
||||
|
||||
# Calculate the number of business days remaining
|
||||
remaining_business_days = count_business_days(now, target_date)
|
||||
|
||||
print(f"Business days remaining until April 8: {remaining_business_days}")
|
||||
print(f"Business days remaining until Sep 17: {remaining_business_days}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user