1
0
mirror of https://github.com/oliverbooth/X10D synced 2024-11-23 01:28:48 +00:00

🔥 Remove Days() from IComparable

This commit is contained in:
Oliver Booth 2019-11-16 11:18:19 +00:00
parent c3d1b035c0
commit e9f0a94cad
No known key found for this signature in database
GPG Key ID: 4B0992B2602C3778

View File

@ -22,13 +22,5 @@
/// otherwise.</returns> /// otherwise.</returns>
public static bool Between<T>(this T actual, T lower, T upper) where T : IComparable<T> => public static bool Between<T>(this T actual, T lower, T upper) where T : IComparable<T> =>
actual.CompareTo(lower) > 0 && actual.CompareTo(upper) < 0; actual.CompareTo(lower) > 0 && actual.CompareTo(upper) < 0;
/// <summary>
/// Gets the value
/// </summary>
/// <param name="value"></param>
/// <returns></returns>
public static TimeSpan Days(this IComparable value) =>
TimeSpan.FromDays((double)value);
} }
} }