コード例 #1
0
    public static int CompareRounded(this DateTime?x, DateTime?y, TimeSpan interval)
    {
        var comparer = new RoundedDateTimeComparer(interval);

        return(comparer.Compare(x, y));
    }
コード例 #2
0
    public static bool EqualsRounded(this DateTime?x, DateTime?y, TimeSpan interval)
    {
        var comparer = new RoundedDateTimeComparer(interval);

        return(comparer.Equals(x, y));
    }