Can someone help me please, I have this function and it returns hours between 8h00 and 16h00 during the week

The help I need is, I need to return minutes instead of hours and it must not return any minutes in the following holiday table since we are not working
Holiday
2004-08-09 00:00:00.000
2004-09-24 00:00:00.000
2004-12-16 00:00:00.000
2004-12-26 00:00:00.000
2004-12-25 00:00:00.000
2005-01-01 00:00:00.000


CREATE FUNCTION dbo.fn_CalculateHours
(@DateFrom datetime, @DateTo datetime)
RETURNS int
AS
BEGIN
DECLARE @hFrom int, @hTo int
SET @DateFrom = (CASE DATEPART(weekday,@DateFrom)
WHEN 1 THEN CONVERT(varchar(10),DATEADD(day,1,@DateFrom),120) + ' 08:00:00'
WHEN 7 THEN CONVERT(varchar(10),DATEADD(day,2,@DateFrom),120) + ' 08:00:00'
ELSE @DateFrom
END)
SET @DateTo = (CASE DATEPART(weekday,@DateFrom)
WHEN 1 THEN CONVERT(varchar(10),DATEADD(day,-2,@DateTo),120) + ' 16:00:00'
WHEN 7 THEN CONVERT(varchar(10),DATEADD(day,-1,@DateTo),120) + ' 16:00:00'
ELSE @DateTo
END)
SELECT @hFrom = DATEPART(hour,@DateFrom)
SELECT @hTo = DATEPART(hour,@DateTo)
RETURN ((DATEDIFF(day,@DateFrom,@DateTo) - (DATEDIFF(week,@DateFrom,@DateTo) * 2) - 1) * 8) +
(CASE WHEN @hFrom < 8 THEN 8
WHEN @hFrom > 16 THEN 0
ELSE 16 - @hFrom
END) +
(CASE WHEN @hTo < 8 THEN 0
WHEN @hTo > 16 THEN 8
ELSE @hTo - 8
END)
END