Class IntervalExtensions
Содержит методы расширения для работы с интервалами дат.
Inheritance
System.Object
IntervalExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Lers.Data
Assembly: Lers.Core.dll
Syntax
public static class IntervalExtensions
Methods
ContainsDate(Interval, DateTime)
Вернёт true если интервал содержит указанную дату.
Declaration
public static bool ContainsDate(this Interval interval, DateTime date)
Parameters
| Type | Name | Description |
|---|---|---|
| Interval | interval | |
| System.DateTime | date |
Returns
| Type | Description |
|---|---|
| System.Boolean |
ContainsDateExcluding(Interval, DateTime)
Вернёт true если интервал содержит указанную дату, не учитывая дату окончания.
Declaration
public static bool ContainsDateExcluding(this Interval interval, DateTime date)
Parameters
| Type | Name | Description |
|---|---|---|
| Interval | interval | |
| System.DateTime | date |
Returns
| Type | Description |
|---|---|
| System.Boolean |
ContainsDay(Interval, DateTime)
Определяет, содержит ли интервал указанную дату с точностью до суток. В отличие от ContainsDate(Interval, DateTime), которая проверяет точное совпадение даты.
Declaration
public static bool ContainsDay(this Interval interval, DateTime date)
Parameters
| Type | Name | Description |
|---|---|---|
| Interval | interval | |
| System.DateTime | date |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Extend(Interval, TimeSpan)
Увеличивает интервал на указанный диапазон дат.
Declaration
public static Interval Extend(this Interval interval, TimeSpan length)
Parameters
| Type | Name | Description |
|---|---|---|
| Interval | interval | |
| System.TimeSpan | length |
Returns
| Type | Description |
|---|---|
| Interval |