AcTools.Utils.Helpers.DateTimeExtension.CompareByDays C# (CSharp) Method

CompareByDays() public static method

public static CompareByDays ( this a, System.DateTime b ) : int
a this
b System.DateTime
return int
        public static int CompareByDays(this DateTime a, DateTime b) {
            var d = a.Year - b.Year;
            if (d != 0) return d;

            d = a.Month - b.Month;
            if (d != 0) return d;

            d = a.Day - b.Day;
            return d;
        }
    }