예제 #1
0
 /// <summary>
 /// Returns the intersecting time span between the two values
 /// </summary>
 /// <param name="Span">Span to use</param>
 /// <returns>The intersection of the two time spans</returns>
 public DateSpan Intersection(DateSpan Span)
 {
     if (Span.IsNull())
         return null;
     if (!Overlap(Span))
         return null;
     DateTime Start = Span.Start > this.Start ? Span.Start : this.Start;
     DateTime End = Span.End < this.End ? Span.End : this.End;
     return new DateSpan(Start, End);
 }