mirror of
https://github.com/ckaczor/HomeMonitor.git
synced 2026-02-07 17:24:50 -05:00
Implement weather calculations in the service
This commit is contained in:
12
Weather/Service/Extensions.cs
Normal file
12
Weather/Service/Extensions.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
|
||||
namespace ChrisKaczor.HomeMonitor.Weather.Service
|
||||
{
|
||||
public static class Extensions
|
||||
{
|
||||
public static bool IsBetween<T>(this T item, T start, T end) where T : IComparable
|
||||
{
|
||||
return item.CompareTo(start) >= 0 && item.CompareTo(end) <= 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user