ESGRAF48/source/Age.h

23 lines
367 B
C
Raw Normal View History

#pragma once
2018-06-09 11:13:00 +00:00
#include <QDate>
class Age
{
2018-06-09 11:13:00 +00:00
private:
unsigned int m_years = 0;
unsigned int m_months = 0;
public:
Age() = default;
Age(unsigned int years, unsigned int months);
Age(const QDate &birth, const QDate &reference);
bool operator<(const Age &cmp) const;
2018-06-09 11:13:00 +00:00
unsigned int years() const;
unsigned int months() const;
2018-06-14 17:52:19 +00:00
std::string toString() const;
};