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; }
public bool Collision(DatePeriod period) { return Collision(this, period); }