Answer the question
In order to leave comments, you need to log in
Is there a formula for calculating working time?
I can not formulate a question for Google, how to call "time windows", so I ask for your help:
Let's say a person works exactly 8 hours, respectively, 16 hours of "rest". There is a time for the task, which is, for example, 40 hours. When working 8 hours a day, this will take 5 days, but not 120 hours (5 * 24), but 104 - five times 8 hours and 4 times 16 (8 + 16 + 8 + 16 + 8 + 16 + 8 + 16 +8).
Work for 8 hours will take, it turns out, not "one day", a multiple of days, but 8 hours, while 9 working hours will take 25 actual hours.
Actually, I started to reinvent the wheel, taking into account an even and an odd number, with if-else blocks ... well, I thought that maybe there is a normal mathematical solution "in one line".
Everything is suitable as an example - a description in words, links to Wikipedia, examples in PL (I understand php and js).
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question