Click or drag to resize

DateRange Structure

Represents a range of dates, corresponding to the Apache Solr type DateRangeField.

A date range can have one or two bounds, namely lower bound and upper bound, to represent an interval of time. Date range bounds are both inclusive. For example:

  • [2015 TO 2016-10] represents from the first day of 2015 to the last day of October 2016
  • 2015 represents during the course of the year 2015.
  • [2017 TO *] represents any date greater or equals to the first day of the year 2017.

Note that this representation of DateRangeField does not support Dates outside of the range supported by DateTimeOffset: from 1/1/0001 12:00:00 AM +00:00 to 12/31/9999 11:59:59 PM +00:00.

Namespace:  Dse.Search
Assembly:  Dse (in Dse.dll) Version: 2.9.0
Syntax
C#
public struct DateRange : IEquatable<DateRange>, 
	IComparable<DateRange>

The DateRange type exposes the following members.

Constructors
  NameDescription
Public methodDateRange(DateRangeBound)
Creates a new instance of DateRange using a lower bound and an upper bound.

Consider using Parse(String) to create instances more easily.

Public methodDateRange(DateRangeBound, DateRangeBound)
Creates a new instance of DateRange using a lower bound and an upper bound.

Consider using Parse(String) to create instances more easily.

Top
Properties
  NameDescription
Public propertyLowerBound
Gets the lower bound of this range (inclusive).
Public propertyUpperBound
Gets the upper bound of this range (inclusive).
Top
Methods
  NameDescription
Public methodCompareTo
Compares the DateRange based to the bytes representation.
Public methodEquals(Object)
Indicates whether this instance and a specified object are equal.
(Overrides ValueTypeEquals(Object).)
Public methodEquals(DateRange)
Returns true if the value of this DateRange instance and other are the same.
Public methodGetHashCode
Returns the hash code for this instance.
(Overrides ValueTypeGetHashCode.)
Public methodStatic memberParse
Returns the DateRange representation from a given string.

String representations of dates are always expressed in Coordinated Universal Time(UTC)

Public methodToString
Returns the string representation of the instance.
(Overrides ValueTypeToString.)
Top
Operators
  NameDescription
Public operatorStatic memberEquality
Compares value equality of 2 DateRange instances.
Public operatorStatic memberInequality
Compares value inequality of 2 DateRange instances.
Top
Remarks
DateRange instances are immutable and thread-safe.
See Also