feat: time tracking in minutes

This commit is contained in:
2024-11-22 21:34:17 +04:00
parent 8652d31f6d
commit 42a193dae7
6 changed files with 23 additions and 13 deletions

7
utils/work_time.py Normal file
View File

@@ -0,0 +1,7 @@
from math import floor
def hours_to_hours_and_minutes(hours: float) -> tuple[int, int]:
res_hours = int(floor(hours))
minutes = int(round((hours - res_hours) * 60))
return res_hours, minutes