DateTimeExtensions.IsLeapYear method

Version 1.1.28
.NET Framework 4.8
Namespace Skybrud.Essentials.Time.Extensions
Assembly Skybrud.Essentials.dll

IsLeapYear(DateTime)

Extension method

Gets whether the specified date is a leap year.

public static bool IsLeapYear(this DateTime date)

Parameters

date DateTime

An instance of DateTime representing the date.

Returns

true if the year of date is a leap year; otherwise false.

IsLeapYear(int)

Extension method

Gets whether the specified year is a leap year.

public static bool IsLeapYear(this int year)

Parameters

year int

The year.

Returns

true if year is a leap year; otherwise false.