DateTimeOffsetExtensions.IsLeapYear method

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

IsLeapYear(DateTimeOffset)

Extension method

Gets whether the specified date is a leap year.

public static bool IsLeapYear(this DateTimeOffset date)

Parameters

An instance of DateTimeOffset 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.