Hot Door CORE 0.8.2
Adobe® Illustrator® Plug-in Library
|
Allows for acquisition and manipulation of a date (day of year) and time (of day) More...
#include <hdicoreDateTime.h>
Public Member Functions | |
DateTime () | |
Constructs a DateTime object with a default value (1970-01-01 00:00:00) | |
DateTime (const DateTime &dt_) | |
Constructs a DateTime object from another existing DateTime object. | |
DateTime (const Date &d_, const Time &t_) | |
Constructs a DateTime object from existing Date and Time objects. | |
DateTime (const int32_t ts_) | |
Constructs a DateTime object from a POSIX timestamp. | |
DateTime (const int64_t ts_) | |
Constructs a DateTime object from a POSIX timestamp. | |
DateTime (const double ts_) | |
Constructs a DateTime object from a POSIX timestamp. | |
DateTime (const std::string &dt_) | |
Constructs a DateTime object from a string representation of a datetime. | |
DateTime (const int16_t year_, const int16_t month_, const int16_t day_, const int16_t hour_, const int16_t min_, const int16_t sec_=0, const int32_t us_=0) | |
Constructs a DateTime object from a given year, month, day, hour, minute, second, and microsecond. | |
virtual | ~DateTime () |
Destructs a DateTime object. | |
virtual DateTime & | operator= (const DateTime &rhs_) |
Overloaded assignment operator to copy values from one DateTime object to another. | |
virtual bool | operator== (const DateTime &rhs_) const |
Overloaded equality operator to determine if two DateTime objects are equal. | |
virtual bool | operator!= (const DateTime &rhs_) const |
Overloaded inequality operator to determine if two DateTime objects differ. | |
virtual bool | operator< (const DateTime &rhs_) const |
Overloaded less-than operator to determine if one DateTime object is earlier in time than the other. | |
virtual bool | operator<= (const DateTime &rhs_) const |
Overloaded less-than-or-equal operator to determine if one DateTime object is earlier in time than, or equal to, the other. | |
virtual bool | operator> (const DateTime &rhs_) const |
Overloaded greater-than operator to determine if one DateTime object is later in time than the other. | |
virtual bool | operator>= (const DateTime &rhs_) const |
Overloaded greater-than-or-equal operator to determine if one DateTime object is later in time than, or equal to, the other. | |
virtual Duration | operator- (const DateTime &rhs_) const |
Overloaded subtraction operator to determine the duration between two DateTime objects. | |
virtual DateTime | operator- (const Duration &rhs_) const |
Overloaded substraction operator to determine the resultant date and time before the target. | |
virtual DateTime & | operator-= (const Duration &rhs_) |
Overloaded subtraction-assignment operator to determine and assign the resultant date and time before the initial target. | |
virtual DateTime | operator+ (const Duration &rhs_) const |
Overloaded addition operator to determine the resultant date and time after the target. | |
virtual DateTime & | operator+= (const Duration &rhs_) |
Overloaded addition-assignment operator to determine and assign the resultant date and time after the initial target. | |
Date | date () const |
Gets the date for the DateTime object. | |
void | setDate (const Date &d_) |
Sets the date for the DateTime object. | |
Time | time () const |
Gets the time for the DateTime object. | |
void | setTime (const Time &t_) |
Sets the time for the DateTime object. | |
virtual std::string | format (const std::string &format_="Y-m-d H:i:s") const |
Formats the target DateTime object into a string representation. | |
Static Public Member Functions | |
static DateTime | Current (const bool us_=false) |
Constructs a DateTime object from the current system time. | |
Allows for acquisition and manipulation of a date (day of year) and time (of day)
hdi::core::DateTime::DateTime | ( | ) |
Constructs a DateTime object with a default value (1970-01-01 00:00:00)
hdi::core::DateTime::DateTime | ( | const DateTime & | dt_ | ) |
|
explicit |
|
explicit |
|
explicit |
hdi::core::DateTime::DateTime | ( | const std::string & | dt_ | ) |
Constructs a DateTime object from a string representation of a datetime.
dt_ | String representation of a datetime |
hdi::core::DateTime::DateTime | ( | const int16_t | year_, |
const int16_t | month_, | ||
const int16_t | day_, | ||
const int16_t | hour_, | ||
const int16_t | min_, | ||
const int16_t | sec_ = 0 , |
||
const int32_t | us_ = 0 |
||
) |
Constructs a DateTime object from a given year, month, day, hour, minute, second, and microsecond.
year_ | Year, in the range [1970,9999] |
month_ | Month of the given year, in the range [1,12] |
day_ | Day of the month, in the range [1,31] |
hour_ | Hour of the day, in the range [0,23] |
min_ | Minute of the given hour, in the range [0,59] |
sec_ | Second of the given minute, in the range [0,59] |
us_ | Microsecond of the given second, in the range [0,999999] |
|
virtual |
Destructs a DateTime object.
|
static |
Date hdi::core::DateTime::date | ( | ) | const |
|
virtual |
Formats the target DateTime object into a string representation.
format_ | Input string representing the format for the output string |
|
virtual |
Overloaded inequality operator to determine if two DateTime objects differ.
rhs_ | Righthand side of the operator, |
Overloaded addition operator to determine the resultant date and time after the target.
rhs_ | Righthand side of the operator, Duration object to add to the lefthand side |
Overloaded addition-assignment operator to determine and assign the resultant date and time after the initial target.
rhs_ | Righthand side of the operator, Duration object to add to the lefthand side |
Overloaded substraction operator to determine the resultant date and time before the target.
rhs_ | Righthand side of the operator, Duration object to substract from the lefthand side |
Overloaded subtraction-assignment operator to determine and assign the resultant date and time before the initial target.
rhs_ | Righthand side of the operator, Duration object to substract from the lefthand side |
|
virtual |
Overloaded less-than operator to determine if one DateTime object is earlier in time than the other.
rhs_ | Righthand side of the operator; DateTime object that might be later in time than the target (i.e. lefthand side) |
|
virtual |
Overloaded less-than-or-equal operator to determine if one DateTime object is earlier in time than, or equal to, the other.
rhs_ | Righthand side of the operator; DateTime object that might be later in time than, or equal to, the target (i.e. lefthand side) |
|
virtual |
|
virtual |
Overloaded greater-than operator to determine if one DateTime object is later in time than the other.
rhs_ | Righthand side of the operator; DateTime object that might be earlier in time than the target (i.e. lefthand side) |
|
virtual |
Overloaded greater-than-or-equal operator to determine if one DateTime object is later in time than, or equal to, the other.
rhs_ | Righthand side of the operator; DateTime object that might be earlier in time than, or equal to, the target (i.e. lefthand side) |
void hdi::core::DateTime::setDate | ( | const Date & | d_ | ) |
void hdi::core::DateTime::setTime | ( | const Time & | t_ | ) |
Time hdi::core::DateTime::time | ( | ) | const |