mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-20 22:14:34 -04:00
New: VIP Expiration notifications on Newznab
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
|
||||
namespace NzbDrone.Common.Extensions
|
||||
{
|
||||
@@ -34,6 +34,20 @@ namespace NzbDrone.Common.Extensions
|
||||
return dateTime >= afterDateTime;
|
||||
}
|
||||
|
||||
public static bool IsValidDate(this string dateTime)
|
||||
{
|
||||
DateTime.TryParse(dateTime, out DateTime result);
|
||||
|
||||
return !result.Equals(default(DateTime));
|
||||
}
|
||||
|
||||
public static bool IsFutureDate(this string dateTime)
|
||||
{
|
||||
DateTime.TryParse(dateTime, out DateTime result);
|
||||
|
||||
return !result.Equals(default(DateTime)) && result.After(DateTime.Now);
|
||||
}
|
||||
|
||||
public static bool Between(this DateTime dateTime, DateTime afterDateTime, DateTime beforeDateTime)
|
||||
{
|
||||
return dateTime >= afterDateTime && dateTime <= beforeDateTime;
|
||||
|
||||
Reference in New Issue
Block a user