As you see in the picture I have 3 rates.
YELLOW rate
Monday - Saturday 00:00 - 06:00
Monday - Friday 18:00 - 24:00
Saturday 11:00 - 18:00
WHITE rate
Monday - Friday 06:00 - 18:00
Saturday 06:00 - 11:00
RED rate
Saturday 18:00 - 24:00
Sunday 00:00 - 24:00
How would I make the hour calculation between to dates and hours like
So if I worked
START: 8. january 10:00 END: 9. january 23:00
How can I make a javascript calculation on that?