budget/src/data/dateMoney.cpp

26 lines
494 B
C++
Raw Normal View History

//
// Created by quentin on 8/12/22.
//
#include "dateMoney.h"
bool DateMoney::operator<(const DateMoney &rhs) const {
return mktime(date) < mktime(rhs.date);
}
bool DateMoney::operator>(const DateMoney &rhs) const {
return rhs < *this;
}
bool DateMoney::operator<=(const DateMoney &rhs) const {
return !(rhs < *this);
}
bool DateMoney::operator>=(const DateMoney &rhs) const {
return !(*this < rhs);
}
DateMoney::DateMoney(const int *value, tm *date) : value(value), date(date) {}