TimeHelper.IsLeapYear method

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

IsLeapYear(DateTime)

Static

Gets whether the specified date is a leap year.

public static bool IsLeapYear(DateTime date)

Parameters

date DateTime

The date.

Returns

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

IsLeapYear(DateTimeOffset)

Static

Gets whether the specified date is a leap year.

public static bool IsLeapYear(DateTimeOffset date)

Parameters

The date.

Returns

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

IsLeapYear(int)

Static

Gets whether the specified year is a leap year.

public static bool IsLeapYear(int year)

Parameters

year int

The year.

Returns

Returns true if the specified year is a leap year; otherwise false.