Example #1
0
 /// <summary>
 /// Verifica se range si sovrappone con questo DateRange
 /// </summary>
 /// <param name="range">altra data con cui verificare la sovrapposizione</param>
 /// <returns>True se c'รจ almeno un giorno in comune altrimenti false</returns>
 public bool OverlapWith(DateRange range) => Contains(range) || range.Contains(this) || (StartDate <= range.EndDate && EndDate >= range.EndDate) ||
 (StartDate <= range.StartDate && EndDate >= range.StartDate);
Example #2
0
 public DatePriceDescriptor(string name, string description, DateRange range, double price = 0) : base(name, description, price)
 {
     _range = range;
 }
Example #3
0
 public bool Contains(DateRange range) => StartDate <= range.StartDate && range.EndDate <= EndDate;