I want to add certain number of hours to date, ignoring the weekends
For example,
(Friday 18:00) + 48 = (Tuseday 18:00) (Saturday and Sunday are ignored)
Basically what you need to do is to first calculate how many hours that remain of the week (this is the difference between current time and 24:00@Fri). If the number of hours are less than that you just add.
Otherwise you subtract that amount from the hours and then if the remainder is more than 120h (one week) you take the integer quotient and skips that many weeks. Finally you add the remainder to 00:00@Mon that week.
In your example you have between your start and 24:00@Fri 6h, that's less than 48h so you subtract 6h from it and get 42h. Now 42h is less than 120h so you don't skip weeks then you add 42h to 00:00@Mon by which you arrive at 18:00@Tue.