DateTime.DaysInMonth
DateTime.IsLeapYear
TimeSpan.FromDays
うるう年かどうかを確認します。
DateTime.IsLeapYear(year)
아래 값을 입력하면 예제에 즉시 반영됩니다.
Console
WriteLine
IsLeapYear
Console.WriteLine(DateTime.IsLeapYear(2024)); // True Console.WriteLine(DateTime.IsLeapYear(2023)); // False