79514725

Date: 2025-03-17 13:36:09
Score: 1
Natty:
Report link

You can implement a simple function to calculate the overlap between two time ranges similar to how it's done here: Efficient date range overlap calculation?

Then the number of hours worked in each shift is just the overlap between the employee's working time with that specific shift working hours.

Reasons:
  • Low length (0.5):
  • No code block (0.5):
Posted by: Georgi Stoyanov