Skip to content
ConsoleMonster
Class

DateRange

ConsoleMonster.Dates

Namespace
ConsoleMonster.Dates
Assembly
ConsoleMonster
Implements
IEquatable<DateRange>
Modifiers
sealed

One inclusive civil-date range. Dates have unspecified kind and midnight time; no time-zone conversion occurs.

Inheritance

  • object
  • DateRange

Usage

Explore 1 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters 1

Constructors

public DateRange(DateTime start, DateTime end) #

Creates an ordered, inclusive range.

Parameters

start System.DateTime required
end System.DateTime required

Methods

Equals 2 overloads
public bool Equals(DateRange? other) #

Indicates whether the current object is equal to another object of the same type.

Parameters

other ConsoleMonster.Dates.DateRange? required
An object to compare with this object.

Returns

bool true if the current object is equal to the other parameter; otherwise, false.
public override bool Equals(object? obj) #

Determines whether the specified object is equal to the current object.

Parameters

obj object? required
The object to compare with the current object.

Returns

bool true if the specified object is equal to the current object; otherwise, false.
public override int GetHashCode() #

Serves as the default hash function.

Returns

int A hash code for the current object.
public override string ToString() #

Returns a string that represents the current object.

Returns

string A string that represents the current object.

Properties

public DateTime Start { get; } #

The first included date.

public DateTime End { get; } #

The last included date.