PeanutButter
Loading...
Searching...
No Matches
PeanutButter.RandomGenerators.DateRange Class Reference

Holds a date range. More...

Public Member Functions

 DateRange (DateTime from, DateTime to)
 Constructs a new DateRange object, ensuring that {from} is less than {to}.
bool InRange (DateTime value)
 Tests whether a provided DateTime value is within the stored range.

Properties

DateTime From [get]
 Start of the date range.
DateTime To [get]
 End of the date range.

Detailed Description

Holds a date range.

Constructor & Destructor Documentation

◆ DateRange()

PeanutButter.RandomGenerators.DateRange.DateRange ( DateTime from,
DateTime to )

Constructs a new DateRange object, ensuring that {from} is less than {to}.

Parameters
fromDate to start the range
toDate for the end of the range

Member Function Documentation

◆ InRange()

bool PeanutButter.RandomGenerators.DateRange.InRange ( DateTime value)

Tests whether a provided DateTime value is within the stored range.

Parameters
valueValue to test
Returns
True if the value falls within the date range

The documentation for this class was generated from the following file:
  • source/TestUtils/PeanutButter.RandomGenerators/DateRange.cs