Spreadsheet: 61480d1262360917-calculate-working-shifts-per-day-from-monthly-report-712347_zbor
Sheet: Sheet1

 |  | Person A |  | Person B |  | Month | 2009-12-01 00:00:00 | UDF proof
Date | Day | Work time |  | Work time |  | Start | End | Regular | Evening | Night Shift | Sunday | PH
2009-11-30 00:00:00 | 2009-11-30 00:00:00 | [NAME] |  | [NAME] |  | 2009-12-01 00:00:00 | 2009-12-01 08:00:00 | 2 |  | 6 |  |  | 8.000000000058208 | 8
2009-12-01 00:00:00 | 2009-12-01 00:00:00 | free_00 | 6+2 | day_shift_12 |  | 2009-12-01 00:00:00 | 2009-12-01 00:00:00 |  |  |  |  |  | 0 | 0
2009-12-02 00:00:00 | 2009-12-02 00:00:00 | free_00 | 0 | [NAME] |  | 2009-12-02 00:00:00 | 2009-12-02 00:00:00 |  |  |  |  |  | 0 | 0
2009-12-03 00:00:00 | 2009-12-03 00:00:00 | free_00 | 0 | [NAME] |  | 2009-12-03 00:00:00 | 2009-12-03 00:00:00 |  |  |  |  |  | 0 | 0
2009-12-04 00:00:00 | 2009-12-04 00:00:00 | day_shift_12 | 12 | [NAME] |  | 2009-12-04 08:00:00 | 2009-12-04 20:00:00 | 8 | 4 |  |  |  | 12 | 12
2009-12-05 00:00:00 | 2009-12-05 00:00:00 | [NAME] | 2+2 | free_00 |  | 2009-12-05 20:00:00 | 2009-12-06 08:00:00 |  | 2 | 2 | 8 |  | 12 | 12
2009-12-06 00:00:00 | 2009-12-06 00:00:00 | free_00 | 8 | free_00 |  | 2009-12-06 00:00:00 | 2009-12-06 00:00:00 |  |  |  |  |  | 0 | 0
2009-12-07 00:00:00 | 2009-12-07 00:00:00 | free_00 | 0 | free_00 |  | 2009-12-07 00:00:00 | 2009-12-07 00:00:00 |  |  |  |  |  | 0 | 0
2009-12-08 00:00:00 | 2009-12-08 00:00:00 | vacation_08 | 8 | day_shift_12 |  | 2009-12-08 06:00:00 | 2009-12-08 14:00:00 | 8 |  |  |  |  | 8.000000000058208 | 8
2009-12-09 00:00:00 | 2009-12-09 00:00:00 | vacation_08 | 8 | [NAME] |  | 2009-12-09 06:00:00 | 2009-12-09 14:00:00 | 8 |  |  |  |  | 8.000000000058208 | 8 |  |  | start time | end time
2009-12-10 00:00:00 | 2009-12-10 00:00:00 | vacation_08 | 8 | free_00 |  | 2009-12-10 06:00:00 | 2009-12-10 14:00:00 | 8 |  |  |  |  | 8.000000000058208 | 8 |  | [NAME] | 20:00:00 | 08:00:00
2009-12-11 00:00:00 | 2009-12-11 00:00:00 | vacation_08 | 8 | free_00 |  | 2009-12-11 06:00:00 | 2009-12-11 14:00:00 | 8 |  |  |  |  | 8.000000000058208 | 8 |  | day_shift_12 | 08:00:00 | 20:00:00
2009-12-12 00:00:00 | 2009-12-12 00:00:00 | free_00 | 0 | day_shift_12 |  | 2009-12-12 00:00:00 | 2009-12-12 00:00:00 |  |  |  |  |  | 0 | 0 |  | free_00
2009-12-13 00:00:00 | 2009-12-13 00:00:00 | free_00 | 0 | [NAME] |  | 2009-12-13 00:00:00 | 2009-12-13 00:00:00 |  |  |  |  |  | 0 | 0 |  | vacation_08 | 06:00:00 | 14:00:00
2009-12-14 00:00:00 | 2009-12-14 00:00:00 | vacation_08 | 8 | free_00 |  | 2009-12-14 06:00:00 | 2009-12-14 14:00:00 | 8 |  |  |  |  | 8.000000000058208 | 8 |  | [NAME] | 08:00:00 | 16:00:00
2009-12-15 00:00:00 | 2009-12-15 00:00:00 | vacation_08 | 8 | free_00 |  | 2009-12-15 06:00:00 | 2009-12-15 14:00:00 | 8 |  |  |  |  | 8.000000000058208 | 8 |  | afternoon_08 | 13:00:00 | 21:00:00
2009-12-16 00:00:00 | 2009-12-16 00:00:00 | vacation_08 | 8 | day_shift_12 |  | 2009-12-16 06:00:00 | 2009-12-16 14:00:00 | 8 |  |  |  |  | 8.000000000058208 | 8
2009-12-17 00:00:00 | 2009-12-17 00:00:00 | vacation_08 | 8 | [NAME] |  | 2009-12-17 06:00:00 | 2009-12-17 14:00:00 | 8 |  |  |  |  | 8.000000000058208 | 8
2009-12-18 00:00:00 | 2009-12-18 00:00:00 | free_00 | 0 | free_00 |  | 2009-12-18 00:00:00 | 2009-12-18 00:00:00 |  |  |  |  |  | 0 | 0 |  |  | 06:00:00 | 16:00:00 | 22:00:00 | Hollyday | Sunday
2009-12-19 00:00:00 | 2009-12-19 00:00:00 | free_00 | 0 | free_00 |  | 2009-12-19 00:00:00 | 2009-12-19 00:00:00 |  |  |  |  |  | 0 | 0 |  |  | 1 | 1.2 | 1.5 | 1.5 | 1.2
2009-12-20 00:00:00 | 2009-12-20 00:00:00 | day_shift_12 | 12 | free_00 |  | 2009-12-20 08:00:00 | 2009-12-20 20:00:00 |  |  |  | 12 |  | 12 | 12
2009-12-21 00:00:00 | 2009-12-21 00:00:00 | [NAME] | 2+2 | free_00 |  | 2009-12-21 20:00:00 | 2009-12-22 08:00:00 | 2 | 2 | 8 |  |  | 12 | 12
2009-12-22 00:00:00 | 2009-12-22 00:00:00 | free_00 | 6+2 | day_shift_12 |  | 2009-12-22 00:00:00 | 2009-12-22 00:00:00 |  |  |  |  |  | 0 | 0 |  | So….. Night shift on regular day:
2009-12-23 00:00:00 | 2009-12-23 00:00:00 | free_00 | 0 | [NAME] |  | 2009-12-23 00:00:00 | 2009-12-23 00:00:00 |  |  |  |  |  | 0 | 0 |  | start time | 20:00:00 | end time | 08:00:00
2009-12-24 00:00:00 | 2009-12-24 00:00:00 | [NAME] | 8 | [NAME] |  | 2009-12-24 08:00:00 | 2009-12-24 16:00:00 | 8 |  |  |  |  | 7.999999999883585 | 8
2009-12-25 00:00:00 | 2009-12-25 00:00:00 | [NAME] | 4 | free_00 |  | 2009-12-25 20:00:00 | 2009-12-26 08:00:00 |  |  |  |  | 12 | 12 | 12 |  |  | 20:00-22:00 | 22:00-6:00 | 6:00-8:00
2009-12-26 00:00:00 | 2009-12-26 00:00:00 | free_00 | 6+2 | free_00 |  | 2009-12-26 00:00:00 | 2009-12-26 00:00:00 |  |  |  |  |  | 0 | 0 |  |  | 1.2 | 1.5 | 1
2009-12-27 00:00:00 | 2009-12-27 00:00:00 | free_00 | 0 | free_00 |  | 2009-12-27 00:00:00 | 2009-12-27 00:00:00 |  |  |  |  |  | 0 | 0
2009-12-28 00:00:00 | 2009-12-28 00:00:00 | day_shift_12 | 12 | [NAME] |  | 2009-12-28 08:00:00 | 2009-12-28 20:00:00 | 8 | 4 |  |  |  | 12 | 12 |  | So….. Night shift when hollyday or sunday is day after:
2009-12-29 00:00:00 | 2009-12-29 00:00:00 | [NAME] | 2+2 | [NAME] |  | 2009-12-29 20:00:00 | 2009-12-30 08:00:00 | 2 | 2 | 8 |  |  | 12 | 12 |  | start time | 20:00:00 | end time | 08:00:00
2009-12-30 00:00:00 | 2009-12-30 00:00:00 | free_00 | 6+2 | [NAME] |  | 2009-12-30 00:00:00 | 2009-12-30 00:00:00 |  |  |  |  |  | 0 | 0
2009-12-31 00:00:00 | 2009-12-31 00:00:00 | [NAME] | 2+2 | [NAME] |  | 2009-12-31 20:00:00 | 2010-01-01 00:00:00 |  | 2 | 2 |  |  | 3.999999999941792 | 4 |  |  | 20:00-22:00 | 22:00-24:00 | 0:00-8:00
2010-01-01 00:00:00 | 2010-01-01 00:00:00 | [NAME] | 8+8 | [NAME] |  | 2010-01-01 00:00:00 | 2010-01-01 00:00:00 |  |  |  |  |  | 0 |  |  |  | 1.2 | 1.5 | 1,5 (1,2)
 |  | 188 | 168 | 196 |  |  |  | 94 | 16 | 26 | 20 | 12 | 168.0000000003492 | 168
Desc | Type
Total | 0 | 7.000000000014552 |  | 7.166666666627862
Holiday | 1 | 0.5 |  | 0
Sunday | 2 | 0.8333333333357587 |  | 0.1666666666642413
night shift | 3 | 1.083333333333333 |  | 1.25
afternoon | 4 | 0.6666666666666665 |  | 1.083333333333333
regular | 5 | 3.916666666666668 |  | 4.666666666666667