{"text_format":"1","workbook":"xlsx","n_sheets":2,"sheets":["Man Page sbTimeAdd","sbTimeAdd"],"not_rendered":{"charts":0,"images":0,"macros":1,"external_links":0,"defined_names":2,"comments":0,"pivot_tables":0},"unopened":[],"bounds":{"document_bytes":16777216,"sheet_cells":100000,"rows_first":2000,"rows_last":500,"rows_between":2000,"halvings":0,"cell_chars":16384,"cell_head_chars":4096},"cells_cut":0,"cells_raw":0,"read":"whole","date_system":"1900"}

{"sheet":"Man Page sbTimeAdd","index":0,"n_rows":49,"n_cols":6,"rows_kept":49,"cut":false,"hidden":false,"merged":[]}
["Name"]
[]
["sbTimeAdd() - Add positive hours to a timepoint but count only time as specified for week days and for holidays increased by break time if working time exceeds specified time"]
[]
["Synopsis"]
[]
["sbTimeAdd(dt, dh, vwh [, vHolidays] [, dtBreakLimit] [, dtBreakDuration])"]
[]
["Description"]
["Calculate time between two time points but count only time as specified for week days and for holidays increased by break time if daily working time exceeds limit."]
["Example:"]
[null,"dtTo","2019-04-30T11:00:00"]
[null,"dh","07:45:00"]
[null,"vwh","09:00:00","17:00:00"]
[null,null,"09:00:00","17:00:00"]
[null,null,"09:00:00","17:00:00"]
[null,null,"09:00:00","17:00:00"]
[null,null,"09:00:00","17:00:00"]
[null,null,"09:00:00","17:00:00"]
[null,null,"09:00:00","17:00:00"]
[null,null,"00:00:00","00:00:00"]
[null,"vHolidays","2019-05-01"]
[null,"dtBreakLimit","04:00:00",null,null,"Subtract 15 min break if working exceeds 4 hours"]
[null,"dtBreakDuration","00:15:00"]
[]
[null,"Result","2019-05-02T11:00:00","6 hours minus 15 minutes break for Tuesday 30/04/2019, no time for holiday 01/05/2019 and 2 hours for Thursday 02/05/2019."]
[]
["Options"]
[]
["dt"]
[null,"Datetime to add hours to"]
[]
["dh"]
[null,"Hours to add to dt"]
[]
["vwh"]
[null,"8 by 2 matrix defining start time and end time for each weekday, starting with Mondays  (8th row for holidays)"]
[]
["vHolidays"]
[null,"Optional. List of holidays (integer datetime)."]
[]
["dtBreakLimit"]
[null,"Optional. Daily working time limit. If exceeded dtBreakDUration will be subtracted from total time"]
[]
["dtBreakDuration"]
[null,"Optional. Break time. Will be subtracted from total time if daily working time exceeds dtBreakLimit"]
[]
["See Also"]
[null,"sbTimeDiff"]

{"sheet":"sbTimeAdd","index":1,"n_rows":128,"n_cols":11,"rows_kept":128,"cut":false,"hidden":false,"merged":[[0,0,0,3]]}
["sbTimeAdd Examples",null,null,null,null,null,"UK Holidays"]
["Date","+ Hours","Result","Formula","Comment",null,"2019-04-19",null,"Expected correct result","Sign","Difference"]
["2019-12-24T16:00:00",0.75000000000242539,{"$f":"sbTimeAdd(A3,B3,$B$13:$C$20)","v":"2019-12-26T14:00:00"},{"$f":"sbGetCell(C3,\"ShowFormula\")","v":"=sbTimeAdd(A3;B3;$B$13:$C$20)"},"No holidays",null,"2019-04-22",null,"2019-12-26T14:00:00",{"$f":"IF(C3>I3,\"-\",\"\")","v":""},{"$f":"ABS(I3-C3)","v":0}]
["2019-12-24T16:00:00",0.75,{"$f":"sbTimeAdd(A4,B4,$B$13:$C$20,$G$2:$G$128)","v":"2019-12-28T12:00:00"},{"$f":"sbGetCell(C4,\"ShowFormula\")","v":"=sbTimeAdd(A4;B4;$B$13:$C$20;$G$2:$G$128)"},"With holidays",null,"2019-05-06",null,"2019-12-28T12:00:00",{"$f":"IF(C4>I4,\"-\",\"\")","v":""},{"$f":"ABS(I4-C4)","v":0}]
["2020-04-10T11:30:00",0,{"$f":"sbTimeAdd(A5,B5,$B$13:$C$20)","v":"2020-04-10T11:30:00"},{"$f":"sbGetCell(C5,\"ShowFormula\")","v":"=sbTimeAdd(A5;B5;$B$13:$C$20)"},"No holidays",null,"2019-05-27",null,"2020-04-10T11:30:00","",0]
["2020-04-10T11:30:00",0,{"$f":"sbTimeAdd(A6,B6,$B$13:$C$20,$G$2:$G$128)","v":"2020-04-10T12:00:00"},{"$f":"sbGetCell(C6,\"ShowFormula\")","v":"=sbTimeAdd(A6;B6;$B$13:$C$20;$G$2:$G$128)"},"With holidays",null,"2019-08-26",null,"2020-04-10T12:00:00",{"$f":"IF(C6>I6,\"-\",\"\")","v":""},{"$f":"ABS(I6-C6)","v":0}]
["2020-04-09T18:00:00",0.66666666666666674,{"$f":"sbTimeAdd(A7,B7,$B$13:$C$20)","v":"2020-04-13T10:00:00"},{"$f":"sbGetCell(C7,\"ShowFormula\")","v":"=sbTimeAdd(A7;B7;$B$13:$C$20)"},"No holidays",null,"2019-12-25",null,"2020-04-13T10:00:00","",0]
["2020-04-09T18:00:00",0.66666666666666674,{"$f":"sbTimeAdd(A8,B8,$B$13:$C$20,$G$2:$G$128)","v":"2020-04-14T16:00:00"},{"$f":"sbGetCell(C8,\"ShowFormula\")","v":"=sbTimeAdd(A8;B8;$B$13:$C$20;$G$2:$G$128)"},"With holidays",null,"2019-12-26",null,"2020-04-14T16:00:00","",0]
["2020-06-02T10:30:00",0.5,{"$f":"sbTimeAdd(A9,B9,$B$13:$C$20)","v":"2020-06-03T12:30:00"},{"$f":"sbGetCell(C9,\"ShowFormula\")","v":"=sbTimeAdd(A9;B9;$B$13:$C$20)"},"No break",null,"2020-01-01",null,"2020-06-03T12:30:00","",0]
["2020-06-02T10:30:00",0.5,{"$f":"sbTimeAdd(A10,B10,$B$13:$C$20,,$B$23,$C$23)","v":"2020-06-03T13:00:00"},{"$f":"sbGetCell(C10,\"ShowFormula\")","v":"=sbTimeAdd(A10;B10;$B$13:$C$20;;$B$23;$C$23)"},"With break",null,"2020-04-10",null,"2020-06-03T13:00:00","",0]
[null,null,null,null,null,null,"2020-04-13"]
["Working Hours","Start","End",null,null,null,"2020-05-04"]
["Monday",0.33333333333333331,0.75,null,null,null,"2020-05-25"]
["Tuesday",0.33333333333333331,0.75,null,null,null,"2020-08-31"]
["Wednesday",0.33333333333333331,0.75,null,null,null,"2020-12-25"]
["Thursday",0.33333333333333331,0.75,null,null,null,"2020-12-28"]
["Friday",0.33333333333333331,0.75,null,null,null,"2021-01-01"]
["Saturday",0.41666666666666669,0.5,null,null,null,"2021-04-02"]
["Sunday",0.45833333333333331,0.54166666666666663,null,null,null,"2021-04-05"]
["Holidays",0.5,0.58333333333333337,null,null,null,"2021-05-03"]
[null,null,null,null,null,null,"2021-05-31"]
[null,"Limit","Duration",null,null,null,"2021-08-30"]
["Break","06:00:00","00:30:00",null,null,null,"2021-12-27"]
[null,null,null,null,null,null,"2021-12-28"]
[null,null,null,null,null,null,"2022-01-03"]
[null,null,null,null,null,null,"2022-04-15"]
[null,null,null,null,null,null,"2022-04-18"]
[null,null,null,null,null,null,"2022-05-02"]
[null,null,null,null,null,null,"2022-05-30"]
[null,null,null,null,null,null,"2022-08-29"]
[null,null,null,null,null,null,"2022-12-26"]
[null,null,null,null,null,null,"2022-12-27"]
[null,null,null,null,null,null,"2023-01-02"]
[null,null,null,null,null,null,"2023-04-07"]
[null,null,null,null,null,null,"2023-04-10"]
[null,null,null,null,null,null,"2023-05-01"]
[null,null,null,null,null,null,"2023-05-29"]
[null,null,null,null,null,null,"2023-08-28"]
[null,null,null,null,null,null,"2023-12-25"]
[null,null,null,null,null,null,"2023-12-26"]
[null,null,null,null,null,null,"2024-01-01"]
[null,null,null,null,null,null,"2024-03-29"]
[null,null,null,null,null,null,"2024-04-01"]
[null,null,null,null,null,null,"2024-05-06"]
[null,null,null,null,null,null,"2024-05-27"]
[null,null,null,null,null,null,"2024-08-26"]
[null,null,null,null,null,null,"2024-12-25"]
[null,null,null,null,null,null,"2024-12-26"]
[null,null,null,null,null,null,"2025-01-01"]
[null,null,null,null,null,null,"2025-04-18"]
[null,null,null,null,null,null,"2025-04-21"]
[null,null,null,null,null,null,"2025-05-05"]
[null,null,null,null,null,null,"2025-05-26"]
[null,null,null,null,null,null,"2025-08-25"]
[null,null,null,null,null,null,"2025-12-25"]
[null,null,null,null,null,null,"2025-12-26"]
[null,null,null,null,null,null,"2026-01-01"]
[null,null,null,null,null,null,"2026-04-03"]
[null,null,null,null,null,null,"2026-04-06"]
[null,null,null,null,null,null,"2026-05-04"]
[null,null,null,null,null,null,"2026-05-25"]
[null,null,null,null,null,null,"2026-08-31"]
[null,null,null,null,null,null,"2026-12-25"]
[null,null,null,null,null,null,"2026-12-28"]
[null,null,null,null,null,null,"2027-01-01"]
[null,null,null,null,null,null,"2027-03-26"]
[null,null,null,null,null,null,"2027-03-29"]
[null,null,null,null,null,null,"2027-05-03"]
[null,null,null,null,null,null,"2027-05-31"]
[null,null,null,null,null,null,"2027-08-30"]
[null,null,null,null,null,null,"2027-12-27"]
[null,null,null,null,null,null,"2027-12-28"]
[null,null,null,null,null,null,"2028-01-03"]
[null,null,null,null,null,null,"2028-04-14"]
[null,null,null,null,null,null,"2028-04-17"]
[null,null,null,null,null,null,"2028-05-01"]
[null,null,null,null,null,null,"2028-05-29"]
[null,null,null,null,null,null,"2028-08-28"]
[null,null,null,null,null,null,"2028-12-25"]
[null,null,null,null,null,null,"2028-12-26"]
[null,null,null,null,null,null,"2029-01-01"]
[null,null,null,null,null,null,"2029-03-30"]
[null,null,null,null,null,null,"2029-04-02"]
[null,null,null,null,null,null,"2029-05-07"]
[null,null,null,null,null,null,"2029-05-28"]
[null,null,null,null,null,null,"2029-08-27"]
[null,null,null,null,null,null,"2029-12-25"]
[null,null,null,null,null,null,"2029-12-26"]
[null,null,null,null,null,null,"2030-01-01"]
[null,null,null,null,null,null,"2030-04-19"]
[null,null,null,null,null,null,"2030-04-22"]
[null,null,null,null,null,null,"2030-05-06"]
[null,null,null,null,null,null,"2030-05-27"]
[null,null,null,null,null,null,"2030-08-26"]
[null,null,null,null,null,null,"2030-12-25"]
[null,null,null,null,null,null,"2030-12-26"]
[null,null,null,null,null,null,"2031-01-01"]
[null,null,null,null,null,null,"2031-04-11"]
[null,null,null,null,null,null,"2031-04-14"]
[null,null,null,null,null,null,"2031-05-05"]
[null,null,null,null,null,null,"2031-05-26"]
[null,null,null,null,null,null,"2031-08-25"]
[null,null,null,null,null,null,"2031-12-25"]
[null,null,null,null,null,null,"2031-12-26"]
[null,null,null,null,null,null,"2032-01-01"]
[null,null,null,null,null,null,"2032-03-26"]
[null,null,null,null,null,null,"2032-03-29"]
[null,null,null,null,null,null,"2032-05-03"]
[null,null,null,null,null,null,"2032-05-31"]
[null,null,null,null,null,null,"2032-08-30"]
[null,null,null,null,null,null,"2032-12-27"]
[null,null,null,null,null,null,"2032-12-28"]
[null,null,null,null,null,null,"2033-01-03"]
[null,null,null,null,null,null,"2033-04-15"]
[null,null,null,null,null,null,"2033-04-18"]
[null,null,null,null,null,null,"2033-05-02"]
[null,null,null,null,null,null,"2033-05-30"]
[null,null,null,null,null,null,"2033-08-29"]
[null,null,null,null,null,null,"2033-12-26"]
[null,null,null,null,null,null,"2033-12-27"]
[null,null,null,null,null,null,"2034-01-02"]
[null,null,null,null,null,null,"2034-04-07"]
[null,null,null,null,null,null,"2034-04-10"]
[null,null,null,null,null,null,"2034-05-01"]
[null,null,null,null,null,null,"2034-05-29"]
[null,null,null,null,null,null,"2034-08-28"]
[null,null,null,null,null,null,"2034-12-25"]
[null,null,null,null,null,null,"2034-12-26"]