System.Globalization.Calendar.GetLeapMonth C# (CSharp) 메소드

GetLeapMonth() 개인적인 메소드

private GetLeapMonth ( int year ) : int
year int
리턴 int
        public virtual int GetLeapMonth(int year)
        {
            return (GetLeapMonth(year, CurrentEra));
        }

Same methods

Calendar::GetLeapMonth ( int year, int era ) : int

Usage Example

예제 #1
0
 public static void GetLeapMonthTest(Calendar calendar, int yearHasLeapMonth, CalendarAlgorithmType algorithmType)
 {
     if (yearHasLeapMonth > 0)
     {
         Assert.NotEqual(calendar.GetLeapMonth(yearHasLeapMonth),  0);
         Assert.Equal(0, calendar.GetLeapMonth(yearHasLeapMonth - 1));
     }
     else
         Assert.True(calendar.GetLeapMonth(calendar.GetYear(DateTime.Today)) == 0, 
                     "calendar.GetLeapMonth returned wrong value");
 }