static void TestBusinessdaysBetweenTwoDates(IDayCounterFactory factory, DateTime firstDate, DateTime secondDate, IList <DateTime> holidays) { var businessDays = factory.CreateBusinessDayCounter().BusinessDaysBetweenTwoDates(firstDate, secondDate, holidays); Console.WriteLine($"{firstDate.ToString("yyyy-MM-dd")} to {secondDate.ToString("yyyy-MM-dd")} = {businessDays} business days"); }
static void TestWeekdaysBetweenTwoDates(IDayCounterFactory factory, DateTime firstDate, DateTime secondDate) { var weekdays = factory.CreateBusinessDayCounter().WeekdaysBetweenTwoDates(firstDate, secondDate); Console.WriteLine($"{firstDate.ToString("yyyy-MM-dd")} to {secondDate.ToString("yyyy-MM-dd")} = {weekdays} week days"); }