This is preliminary documentation and is subject to change.

DateOnlyRange Class

Implements the IRange interface and provides a time range through its Start and End members

Definition

Namespace: MoreDateTime
Assembly: MoreDateTime (in MoreDateTime.dll) Version: 1.3.0
C#
public class DateOnlyRange
Inheritance
Object    DateOnlyRange

Constructors

DateOnlyRange Initializes a new instance of the DateOnlyRange class.
DateOnlyRange(DateOnlyRange) Initializes a copied new instance of the DateOnlyRange class.
DateOnlyRange(DateTimeRange) Initializes a copied new instance of the DateTimeRange class.
DateOnlyRange(DateOnly, DateOnly) Initializes a new instance of the DateOnlyRange class.
DateOnlyRange(DateTime, DateTime) Initializes a new instance of the DateOnlyRange class.

Properties

End  
IsEmpty Verifies if the range is empty, Start == End == default(T)
Start  

Methods

Contains(DateOnly) Verifies if the given value is contained in this range, including start and end
Contains(DateTime) Verifies if the given value is contained in this range, including start and end
Distance Gets the distance between the Start and the End
Empty Get an empty range
Extend Extends the Start and/or End by the specified timeSpan
IsOrdered Verifies that the order of the dates is correct, Start < End
IsWithin Verifies if the this range is contained entirely in the given range, including start and end
Offset Offsets the Start and End by the specified timeSpan
Order Orders the range, so that Start is guaranteed to be less or equal End
Reduce Reduces the Start and/or End by the specified timeSpan

Extension Methods

Difference Calculates the difference of two DateOnlyRanges. If the two ranges do not overlap, the result is the first DateOnlyRange. Otherwise, the result is the first DateOnlyRange without where both ranges overlap.
(Defined by DateOnlyExtensions)
DoesOverlap Verifies if DateOnlyRange a overlapps with DateOnlyRange b.
(Defined by DateOnlyExtensions)
Intersection Calculates the intersection of two DateOnlyRanges. If the two ranges do not overlap, the result is an empty DateOnlyRange. Otherwise, the result is the DateOnlyRange that where both ranges overlap.
(Defined by DateOnlyExtensions)
Split Splits the given range of DateOnly into the given number of parts.
(Defined by DateOnlyExtensions)
Union Calculates the union of two DateOnlyRanges. If the two ranges do not overlap, the result is an empty DateOnlyRange. Otherwise, the result is the DateOnlyRange that contains both ranges.
(Defined by DateOnlyExtensions)

See Also