예제 #1
0
        private static void TestCalendar(ICalendar calendar)
        {
            DateTime testDate      = new DateTime(17, 2, 2021);
            var      isDayWeekend  = calendar.IsDayWeekend(testDate);
            var      isLeapYear    = calendar.IsLeapYear(testDate);
            var      nameFromDate  = calendar.GetDayNameFromDate(testDate);
            var      daysFromMonth = calendar.GetDaysFromMonthDate(testDate);

            Console.WriteLine($"\nCalendarType: {calendar.GetCalendarType()}\n");
            Console.WriteLine($"Your date - {testDate}\n\n nameFromDate: {nameFromDate}\n daysFromMonth: {daysFromMonth}\n isDayWeekend: {isDayWeekend}\n isLeapYear: {isLeapYear}\n");
        }