WORKDAY.INTL function not working properly in Libreoffice Calc 5.2.2.2

WORKDAY.INTL function is not taking all the holidays in the list while calculating.
I have data like this :


     A             B                C
 HOLIDAYS        MONTH           WORKDAYS
01/10/2016	   01/10/2016       03/10/2016
10/10/2016		                04/10/2016
11/10/2016		                05/10/2016
12/10/2016		                06/10/2016
15/10/2016		                09/10/2016
29/10/2016		                10/10/2016
31/10/2016		                16/10/2016
		                        17/10/2016
		                        18/10/2016
		                        19/10/2016
		                        20/10/2016
		                        23/10/2016
		                        24/10/2016
		                        25/10/2016
		                        26/10/2016
		                        27/10/2016
		                        30/10/2016
		                        31/10/2016

I am using this formula to generate the list of dates in the Month of October 2016.
Column A has a list of holidays, Column B has the starting date, and in Column C, I have entered the formula.

=WORKDAY.INTL($C$2,ROWS($D$2:D2),7,$B$2:$B$8)

I have used 7 for weekend - Sunday, but still it is omitting Saturday also. I tried from 1 to 7 for weekend, using 1 omits Sunday. But in all cases, all the Holidays are not excluded from the list of dates.

What I need is a list of dates for a month excluding weekend - Sunday only and also excluding Holidays as per the list in Column A.

Please clarify and give me the right solution.
Thanks in advance.

Bug tdf#101541 fixed for 5.2.3

Thank you very much sir