Common C++ classes and routines used by my applications such as argument parser, IO and conversion utilities
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

49 lines
824 B

#ifndef PERIOD_H
#define PERIOD_H
#include "./datetime.h"
#include "../application/global.h"
namespace ChronoUtilities {
class LIB_EXPORT Period
{
public:
Period(const DateTime &beg, const DateTime &end);
int years() const;
int months() const;
int days() const;
private:
int m_years;
int m_months;
int m_days;
};
/*!
* \brief Gets the years component of the period represented by the current instance.
*/
inline int Period::years() const
{
return m_years;
}
/*!
* \brief Gets the months component of the period represented by the current instance.
*/
inline int Period::months() const
{
return m_months;
}
/*!
* \brief Gets the days component of the period represented by the current instance.
*/
inline int Period::days() const
{
return m_days;
}
}
#endif // PERIOD_H