42 m_days = end.
day() - begin.
day();
62 auto year = begin.
year() + period.
years();
68 auto day = begin.
day() + period.
days();
Represents an instant in time, typically expressed as a date and time of day.
int day() const
Returns the day component of the date represented by this instance.
int month() const
Returns the month component of the date represented by this instance.
static DateTime fromDate(int year=1, int month=1, int day=1)
Constructs a DateTime to the specified year, month, and day.
constexpr TimeSpan timeOfDay() const
Returns the time of day as TimeSpan for this instance.
static int daysInMonth(int year, int month)
Returns the number of days in the specified month and year.
int year() const
Returns the year component of the date represented by this instance.
Represents a period of time.
constexpr int days() const
Returns the days component of the period represented by the current instance.
constexpr int years() const
Returns the years component of the period represented by the current instance.
constexpr int months() const
Returns the months component of the period represented by the current instance.
Contains all utilities provides by the c++utilities library.
CPP_UTILITIES_EXPORT DateTime operator+(DateTime begin, Period period)
Adds the specified period to the specified date.