MeteoIODoc 20241221.207bde49
mio::DateRange Class Reference

Detailed Description

A class to represent and handle date ranges. They can be sorted, checked for uniqueness and a date can be compared to the range (is it before or after?).

Author
Mathias Bavay

#include <Date.h>

Public Member Functions

 DateRange ()
 
 DateRange (const Date &d1, const Date &d2)
 
bool in (const Date &a) const
 Is the provided date within the current range? More...
 
bool operator< (const Date &a) const
 Is the provided date before the end of the range? More...
 
bool operator> (const Date &a) const
 Is the provided date after the start of the range? More...
 
bool operator< (const DateRange &a) const
 
bool operator== (const DateRange &a) const
 
const std::string toString () const
 

Public Attributes

Date start
 
Date end
 

Constructor & Destructor Documentation

◆ DateRange() [1/2]

mio::DateRange::DateRange ( )
inline

◆ DateRange() [2/2]

mio::DateRange::DateRange ( const Date d1,
const Date d2 
)
inline

Member Function Documentation

◆ in()

bool mio::DateRange::in ( const Date a) const
inline

Is the provided date within the current range?

Parameters
[in]aDate to check
Returns
true if the date is within the current range, false otherwise

◆ operator<() [1/2]

bool mio::DateRange::operator< ( const Date a) const
inline

Is the provided date before the end of the range?

Parameters
[in]aDate to check
Returns
true if the date is less than the end of the current range, false otherwise

◆ operator<() [2/2]

bool mio::DateRange::operator< ( const DateRange a) const
inline

◆ operator==()

bool mio::DateRange::operator== ( const DateRange a) const
inline

◆ operator>()

bool mio::DateRange::operator> ( const Date a) const
inline

Is the provided date after the start of the range?

Parameters
[in]aDate to check
Returns
true if the date is greater than the end of the current range, false otherwise

◆ toString()

const std::string mio::DateRange::toString ( ) const
inline

Member Data Documentation

◆ end

Date mio::DateRange::end

◆ start

Date mio::DateRange::start

The documentation for this class was generated from the following file: