2022-08-13 12:00:05 -05:00
|
|
|
//
|
|
|
|
// Created by quentin on 8/12/22.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef BUDGET_DATEMONEY_H
|
|
|
|
#define BUDGET_DATEMONEY_H
|
|
|
|
|
|
|
|
|
|
|
|
#include <ctime>
|
2022-09-13 15:11:12 -05:00
|
|
|
#include <ostream>
|
2022-08-13 12:00:05 -05:00
|
|
|
|
|
|
|
class DateMoney {
|
|
|
|
public:
|
2022-09-13 15:11:12 -05:00
|
|
|
DateMoney(const int *value, tm *date);
|
|
|
|
|
|
|
|
[[nodiscard]] const int *getValue() const;
|
|
|
|
|
|
|
|
[[nodiscard]] tm *getDate() const;
|
|
|
|
|
2022-08-13 12:00:05 -05:00
|
|
|
bool operator<(const DateMoney &rhs) const;
|
|
|
|
|
|
|
|
bool operator>(const DateMoney &rhs) const;
|
|
|
|
|
|
|
|
bool operator<=(const DateMoney &rhs) const;
|
|
|
|
|
|
|
|
bool operator>=(const DateMoney &rhs) const;
|
|
|
|
|
2022-09-13 15:11:12 -05:00
|
|
|
friend std::ostream &operator<<(std::ostream &os, const DateMoney &money);
|
2022-08-13 12:00:05 -05:00
|
|
|
|
|
|
|
private:
|
2022-08-13 16:35:01 -05:00
|
|
|
const int *value;
|
2022-08-13 12:00:05 -05:00
|
|
|
tm *date;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif //BUDGET_DATEMONEY_H
|