Min and Max methods for DateTime

Math.Max Method doesn’t have overload for DateTime

So I’ve created

        public static DateTime Min(DateTime t1, DateTime t2)

        {

            if (DateTime.Compare(t1, t2) > 0)

            {

                return t2;

            }

            return t1;

        }

        public static DateTime Max(DateTime t1, DateTime t2)

        {

            if (DateTime.Compare(t1, t2) < 0)

            {

                return t2;

            }

            return t1;

        }