7#ifndef __HDI_CORE_DATE__
8#define __HDI_CORE_DATE__
54 Date(
const std::string& date_);
68 Date(
const int16_t year_,
const int16_t month_,
const int16_t day_);
263 virtual std::string
format(
const std::string& format_ =
"Y-m-d")
const;
314 virtual int16_t
day()
const;
378 Date(
const plat::Date&);
381 typedef std::unique_ptr<Date> DateUP;
382 typedef std::shared_ptr<Date> DateSP;
383 typedef std::weak_ptr<Date> DateWP;
Allows for acquisition and manipulation of a date (day of year)
Definition: hdicoreDate.h:25
virtual int16_t year() const
Gets the year represented by the target.
virtual int16_t dayOfYear() const
Gets the day number of the year, from 1 to 366.
virtual bool operator>=(const Date &rhs_) const
Overloaded greater-than-or-equal operator to determine if one Date object is later in time than,...
virtual bool operator==(const Date &rhs_) const
Overloaded equality operator to determine if two Date objects are equal.
virtual bool operator<=(const Date &rhs_) const
Overloaded less-than-or-equal operator to determine if one Date object is earlier in time than,...
static Date Current()
Constructs a Date object from the current system date.
virtual void setMonth(const int16_t month_)
Sets the month of the year represented by the target.
virtual ~Date()
Destructs a Date object.
virtual int16_t month() const
Gets the month of the year represented by the target.
virtual Duration operator-(const Date &rhs_) const
Overloaded subtraction operator to determine the duration between two Date objects.
virtual int16_t day() const
Gets the day of the month represented by the target.
virtual bool operator!=(const Date &rhs_) const
Overloaded inequality operator to determine if two Date objects differ.
virtual Date operator-(const Duration &rhs_) const
Overloaded substraction operator to determine the resultant date before the target.
virtual Date & operator+=(const Duration &rhs_)
Overloaded addition-assignment operator to determine and assign the resultant date after the initial ...
virtual int16_t weekNumber() const
Gets the ISO-8601 week number of the year represented by the target, from 1 to 53.
virtual void setDay(const int16_t day_)
Sets the day of the month represented by the target.
virtual int16_t endOfMonth() const
Gets the last day of the month represented by the target, from 28 to 31.
virtual bool operator>(const Date &rhs_) const
Overloaded greater-than operator to determine if one Date object is later in time than the other.
virtual bool operator<(const Date &rhs_) const
Overloaded less-than operator to determine if one Date object is earlier in time than the other.
virtual Date & operator-=(const Duration &rhs_)
Overloaded subtraction-assignment operator to determine and assign the resultant date before the init...
virtual Date & operator=(const Date &rhs_)
Overloaded assignment operator to copy values from one Date object to another.
virtual std::string format(const std::string &format_="Y-m-d") const
Formats the target Date object into a string representation.
Date(const Date &d_)
Constructs a Date object from another existing Date object.
Date(const int16_t year_, const int16_t month_, const int16_t day_)
Constructs a Date object from a given year, month, and day.
virtual int16_t dayOfWeek() const
Gets the day number of the week, from 0 to 6.
Date()
Constructs a Date object with a default value (1970-01-01)
virtual Date operator+(const Duration &rhs_) const
Overloaded addition operator to determine the resultant date after the target.
virtual void setYear(const int16_t year_)
Sets the year that the target should represent.
Date(const std::string &date_)
Constructs a Date object from a string representation of a date.
Allows for acquisition and manipulation of a date (day of year) and time (of day)
Definition: hdicoreDateTime.h:26
Allows for acquisition and manipulation of a duration of time.
Definition: hdicoreDuration.h:25
hdi::core::Date operator+(const hdi::core::Duration &lhs_, const hdi::core::Date &rhs_)
Adds a duration to a date.
Header file for handling a duration of time.