Python, datetime "time gap" percentage
- by Hellnar
Hello
Assume I have these datatime variables:
start_time, end_time, current_time
I would like to know how much time left as percentage by checking current_time and the time delta between start_time and the end_time
Like if the interval is a 24 hours, and between now and end_time, there are 6 hours left, %25 should be left.
How can this be done ?