DateTimeOffsetExtensions.IsDateWithinLastDays method

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

IsDateWithinLastDays(DateTimeOffset, int)

Extension method

Gets whether date is within the last number of specified days.

public static bool IsDateWithinLastDays(this DateTimeOffset date, int days)

Parameters

An instance of DateTimeOffset representing the date.

days int

The number of days.

Returns

true if date is within the last number of days, otherwise false.