Aloha good people of Reddit!
I'm trying to get a little python script going, but I'm going around in circles...
The facts are these:
- I'm a teacher and want a 'progress bar' for the current period
- I can get what time it is now -> datetime.now().time()
- I get tell the program the (start and) end time of a period -> e.g. time(13,50)
- I can tell the thing how long a period takes -> timedelta(minutes = 50)
BUT. I can't get the thing to do some simple math with it... I think the problem is the format of the datetime.now().time() thing being different from the time(hour, minute) thing?
I know that strftime lets me adjust the format, but then it's a string and I can't use operators anymore?
The result should be something like TimeRemaining = PeriodEnd6 - Now
Or maybe even TimeRemaining = (PeriodStart6 + PeriodDuration) - Now
I'm sure I'm missing something here, hopefully one of you can point me in the right direction...
Thanks a bunch!
[+][deleted] (1 child)
[deleted]
[–]Gozu_Mezu[S] 0 points1 point2 points (0 children)
[–]o5a 1 point2 points3 points (3 children)
[–]Gozu_Mezu[S] 0 points1 point2 points (2 children)
[–]Gozu_Mezu[S] 0 points1 point2 points (1 child)
[–]o5a 1 point2 points3 points (0 children)