From 17cfc440b6a3b2af4521c48e397a5ea60754a0f1 Mon Sep 17 00:00:00 2001 From: Whisker Jones Date: Fri, 8 Mar 2024 15:25:18 -0700 Subject: [PATCH] pto update --- projects/dev/pto_countdown/main.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/projects/dev/pto_countdown/main.py b/projects/dev/pto_countdown/main.py index 99afb60..6868a62 100644 --- a/projects/dev/pto_countdown/main.py +++ b/projects/dev/pto_countdown/main.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 + from datetime import datetime, timedelta def calculate_reach_date(current_hours, max_hours, hours_added_bi_weekly): @@ -33,9 +34,16 @@ def calculate_reach_date(current_hours, max_hours, hours_added_bi_weekly): MAX_HOURS = 240 HOURS_ADDED_BI_WEEKLY = 6.15384615 # HOURS_ADDED_BI_WEEKLY = 7.69230769 +LAST_KNOWN_PTO_BALANCE = 220.08 # Example last known PTO balance -# User input -current_hours = float(input("Enter the current hours: ")) +# Display the last known PTO balance for easy copying +print(f"Last known PTO balance: {LAST_KNOWN_PTO_BALANCE}") + +# User input with a prompt that includes the copy-paste line +current_hours_input = input("Enter the current hours (copy and paste the 'Last known PTO balance' here): ") + +# Convert input to float +current_hours = float(current_hours_input.strip()) # Calculate reach_date = calculate_reach_date(current_hours, MAX_HOURS, HOURS_ADDED_BI_WEEKLY)