Example #1
0
        public static bool Collision(DatePeriod period1, DatePeriod period2)
        {
            if (period2.Start < period1.Start)
            {
                return period2.End >= period1.Start;
            }

            if (period2.End >= period1.End)
            {
                return period2.Start < period1.End;
            }

            return true;
        }
Example #2
0
 public bool Collision(DatePeriod period)
 {
     return Collision(this, period);
 }