budget/src/data/dateMoney.cpp
quentin 5999a45e2b Added Account::getTimeline()
Returns a date sorted list of transactions and earnings.
2022-08-13 12:09:19 -05:00

26 lines
494 B
C++

//
// 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) {}