Skip to content
Auto
Products

TimeSchedulerInterval

Namespace: TagBites.WinSchedulers
Assembly: TagBites.WinSchedulers.dll
Product: TagBites.WinSchedulers v. 1.3.8

Represents a TimeScheduler date time interval.

public struct TimeSchedulerInterval

Initializes a new instance of the TimeSchedulerInterval class with specified start and end datetime.

public TimeSchedulerInterval(DateTime start, DateTime end)

Initializes a new instance of the TimeSchedulerInterval class with specified start datetime and duration.

public TimeSchedulerInterval(DateTime start, TimeSpan duration)

A instance of the TimeSchedulerInterval structure whose Start and End have DateTime.MinValue value.

public TimeSchedulerInterval Empty

TimeSchedulerInterval

A instance of the TimeSchedulerInterval structure whose Start has DateTime.MinValue value and End has DateTime.MaxValue value.

public TimeSchedulerInterval Full

TimeSchedulerInterval

Gets a duration of the interval.

public TimeSpan Duration { get; }

TimeSpan

An object whose value is the end date time of the interval.

Gets the end date time of the interval.

public DateTime End { get; }

DateTime

An object whose value is the end date time of the interval.

Gets the number of days included in the interval.

public int IntersectDaysCount { get; }

int

the number of days included in the interval.

Gets a value indicating whether the Start and End have the same value.

public bool IsEmpty { get; }

bool

true if the Start and End have the same value; otherwise, false.

Gets a middle date time of the interval.

public DateTime Middle { get; }

DateTime

An object whose value is the middle date time of the interval.

Gets the start date time of the interval.

public DateTime Start { get; }

DateTime

An object whose value is the start date time of the interval.

CompleteIntersectsWith(TimeSchedulerInterval)

Section titled “CompleteIntersectsWith(TimeSchedulerInterval)”

Determines whether the interval complete intersect with specified interval.

public bool CompleteIntersectsWith(TimeSchedulerInterval interval)

bool

true if the interval complete intersect with specified interval; otherwise, false.

Determines whether the interval contains the specified date time.

public bool Contains(DateTime dt)
  • dt DateTime
    The date time to locate in the interval.

bool

true if the interval contains the specified date time; otherwise, false.

Determines whether the interval contains the specified interval.

public bool Contains(TimeSchedulerInterval interval)

bool

true if the interval contains the specified interval; otherwise, false.

Creates and returns a interval that is the day intersection of the current TimeSchedulerInterval and the specified DateTime.

public TimeSchedulerInterval DayIntersect(DateTime dt)

TimeSchedulerInterval

A new interval that represents the intersection of the current TimeSchedulerInterval and the specified interval. This object is Empty if the intersection is empty.

Determines whether the interval is equal to the other.

public bool Equals(TimeSchedulerInterval other)

bool

>true if the interval is equal to the other; otherwise, false.

public virtual bool Equals(object obj)

bool

Creates and returns a array of intervals that contain only the portion of the current TimeSchedulerInterval that does not intersect with the specified TimeSchedulerInterval.

public TimeSchedulerInterval[] Exclude(TimeSchedulerInterval interval)

TimeSchedulerInterval[]

A array of intervals that contain only the portion of the current TimeSchedulerInterval that does not intersect with the specified interval.

public virtual int GetHashCode()

int

Creates and returns a interval that is the intersection of the current TimeSchedulerInterval and the specified TimeSchedulerInterval.

public TimeSchedulerInterval Intersect(TimeSchedulerInterval dt)

TimeSchedulerInterval

A new interval that represents the intersection of the current TimeSchedulerInterval and the specified target. This object is Empty if the intersection is empty.

Determines whether the interval intersect with specified interval.

public bool IntersectsWith(TimeSchedulerInterval interval)

bool

true if the interval intersect with specified interval; otherwise, false.

Determines whether the interval intersect with specified dates.

public bool IntersectsWith(DateTime start, DateTime end)
  • start DateTime
    The start date time to test.
  • end DateTime
    The end date time to test.

bool

>true if the interval intersect with specified dates; otherwise, false.

public virtual string ToString()

string

Creates and returns a interval that contains the union of the current TimeSchedulerInterval and the specified TimeSchedulerInterval.

public TimeSchedulerInterval Union(TimeSchedulerInterval interval)

TimeSchedulerInterval

A new interval that represents the union of the current TimeSchedulerInterval and the specified interval.

Union(IEnumerable<TimeSchedulerInterval?>)

Section titled “Union(IEnumerable<TimeSchedulerInterval?>)”

Creates and returns a interval that contains the union of the specified intervals.

public static TimeSchedulerInterval? Union(IEnumerable<TimeSchedulerInterval?> items)

TimeSchedulerInterval?

Creates and returns a interval that contains the union of the specified intervals.

public static TimeSchedulerInterval? Union(IEnumerable<TimeSchedulerInterval> items)

TimeSchedulerInterval?

operator ==(TimeSchedulerInterval, TimeSchedulerInterval)

Section titled “operator ==(TimeSchedulerInterval, TimeSchedulerInterval)”

Determines whether the specified TimeSchedulerInterval instances are considered equal.

public static bool operator ==(TimeSchedulerInterval left, TimeSchedulerInterval right)

bool

true if the TimeSchedulerInterval objects are considered equal; otherwise, false.

operator !=(TimeSchedulerInterval, TimeSchedulerInterval)

Section titled “operator !=(TimeSchedulerInterval, TimeSchedulerInterval)”

Determines whether the specified TimeSchedulerInterval instances are considered different.

public static bool operator !=(TimeSchedulerInterval left, TimeSchedulerInterval right)

bool

true if the TimeSchedulerInterval objects are considered different; otherwise, false.