Ejemplo n.º 1
0
        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");
        }
Ejemplo n.º 2
0
        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");
        }