C++ Utilities
5.0.1
Useful C++ classes and routines such as argument parser, IO and conversion utilities
|
Go to the documentation of this file.
42 m_days = end.
day() - begin.
day();
62 auto year = begin.
year() + period.
years();
68 auto day = begin.
day() + period.
days();
static DateTime fromDate(int year=1, int month=1, int day=1)
Constructs a DateTime to the specified year, month, and day.
int year() const
Returns the year component of the date represented by this instance.
DateTime CPP_UTILITIES_EXPORT operator+(DateTime begin, Period period)
Adds the specified period to the specified date.
Represents a period of time.
constexpr int days() const
Returns the days component of the period represented by the current instance.
int month() const
Returns the month component of the date represented by this 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.
constexpr int years() const
Returns the years component of the period represented by the current instance.
Represents an instant in time, typically expressed as a date and time of day.
static int daysInMonth(int year, int month)
Returns the number of days in the specified month and year.
int day() const
Returns the day component of the date represented by this instance.
constexpr TimeSpan timeOfDay() const
Returns the time of day as TimeSpan for this instance.