System.Globalization.CCGregorianCalendar.IsLeapDay C# (CSharp) Method

IsLeapDay() public static method

A virtual method that tells whether the given day is a leap day.
public static IsLeapDay ( int year, int month, int day ) : bool
year int An integer that specifies the year. ///
month int An integer that specifies the month. ///
day int An integer that specifies the day. ///
return bool
	public static bool IsLeapDay(int year, int month, int day) {
		return is_leap_year(year) && month == 2 && day == 29;
	}

Usage Example

コード例 #1
0
        /// <summary>Determines whether the specified date in the specified era is a leap day.</summary>
        /// <returns>true if the specified day is a leap day; otherwise, false.</returns>
        /// <param name="year">An integer that represents the year. </param>
        /// <param name="month">An integer from 1 to 12 that represents the month. </param>
        /// <param name="day">An integer from 1 to 31 that represents the day. </param>
        /// <param name="era">An integer that represents the era. </param>
        /// <exception cref="T:System.ArgumentOutOfRangeException">
        ///   <paramref name="year" /> is outside the range supported by the calendar.-or- <paramref name="month" /> is outside the range supported by the calendar.-or- <paramref name="day" /> is outside the range supported by the calendar.-or- <paramref name="era" /> is outside the range supported by the calendar. </exception>
        public override bool IsLeapDay(int year, int month, int day, int era)
        {
            int year2 = this.M_CheckYMDEG(year, month, day, ref era);

            return(CCGregorianCalendar.IsLeapDay(year2, month, day));
        }
All Usage Examples Of System.Globalization.CCGregorianCalendar::IsLeapDay