I’m facing a challenge I cannot seem to overcome. Hope someone can show me the light
I’m working on an app which allows planners to create shifts and let workers register for those shifts. Planner can create a shift by selecting start/end date/time and the app automatically calculates the amount of workhours.
However, in comes the challenge, not every hour was an equal hourly wage. Working on a sunday or between certain hours increase the hourly wage (for that time period) with 125% or 150%. How can I divide/split up the time range so I can connect the right hourly wage for every hour to the shift?
Did someone face this already or can someone help me out?
A last resort would be for the planner to input this info, but I rather let the app calculate it to avoid errors and it makes it easier for the planner.
E.g. of the hourly wage:
Between 00:00 and 06:00 147%
Between 06:00 and 07:00 122%
Between 07:00 and 20:00 100%
Between 20:00 and 22:00 122%
Between 22:00 and 23:59 147%
Hope someone can help me out