RStudio Launcher Plugin SDK
1.1.3
A software development kit for creating plugins that work the the RStudio Launcher.
|
Class which represents a date and time in UTC. More...
#include <DateTime.hpp>
Public Member Functions | |
DateTime () | |
Constructor. More... | |
DateTime (const DateTime &in_other) | |
Copy constructor. More... | |
DateTime (DateTime &&in_other) noexcept | |
Move constructor. More... | |
DateTime (std::time_t &in_time) noexcept | |
Constructor. More... | |
DateTime & | operator= (const DateTime &in_other) |
Assignment operator. More... | |
DateTime & | operator= (DateTime &&in_other) noexcept |
Move operator. More... | |
TimeDuration | operator- (const DateTime &in_other) const |
Subtracts two DateTimes to produce an TimeDuration. More... | |
DateTime | operator- (const TimeDuration &in_intervalTime) const |
Subtracts the given TimeDuration from a copy of this DateTime. More... | |
DateTime & | operator-= (const TimeDuration &in_intervalTime) |
Subtracts the given TimeDuration from this DateTime. More... | |
DateTime | operator+ (const TimeDuration &in_intervalTime) const |
Adds the given TimeDuration to a copy of this DateTime. More... | |
DateTime & | operator+= (const TimeDuration &in_intervalTime) |
Adds the given TimeDuration to this DateTime. More... | |
bool | operator== (const DateTime &in_other) const |
Equality operator. More... | |
bool | operator!= (const DateTime &in_other) const |
Inequality operator. More... | |
bool | operator< (const DateTime &in_other) const |
Less than operator. More... | |
bool | operator<= (const DateTime &in_other) const |
Less than operator. More... | |
bool | operator> (const DateTime &in_other) const |
Less than operator. More... | |
bool | operator>= (const DateTime &in_other) const |
Less than operator. More... | |
std::string | toString () const |
Converts this DateTime to an ISO 8601 time string. More... | |
std::string | toString (const char *in_format) const |
Converts this DateTime to a string representation defined by the provided format. More... | |
std::string | toString (const std::string &in_format) const |
Converts this DateTime to a string representation defined by the provided format. More... | |
Static Public Member Functions | |
static Error | fromString (const std::string &in_timeStr, DateTime &out_dateTime) |
Constructs a DateTime by calling FromString and passing the default ISO 8601 string reperesentation. String must be in UTC time. More... | |
static Error | fromString (const std::string &in_timeStr, const std::string &in_format, DateTime &out_dateTime) |
Constructs a DateTime from a valid time format string representation. The string must be in UTC time. More... | |
Class which represents a date and time in UTC.
rstudio::launcher_plugins::system::DateTime::DateTime | ( | ) |
Constructor.
Creates a date time which represents the time at which it was created.
rstudio::launcher_plugins::system::DateTime::DateTime | ( | const DateTime & | in_other | ) |
Copy constructor.
in_other | The DateTime to copied into this. |
|
noexcept |
Move constructor.
in_other | The DateTime to moved into this. |
|
noexcept |
Constructor.
in_time | The time to copy into DateTime. |
|
static |
Constructs a DateTime from a valid time format string representation. The string must be in UTC time.
Valid formats use the boost date_time flags here: https://www.boost.org/doc/libs/1_60_0/doc/html/date_time/date_time_io.html
|
static |
Constructs a DateTime by calling FromString and passing the default ISO 8601 string reperesentation. String must be in UTC time.
Default format: "%Y-%m-%dT%H:%M:%S%F%ZP" e.g. "2020-03-05T14:33:15.008765Z" e.g. "1995-10-31T02:06:22+8:00" (fractional seconds are 0) e.g. "1988-12-25T23:23:23.054321MST-06" e.g. "1972-04-18T00:01:51PST-08PDT+01,M4.1.0/02:00,M10.5.0/02:00" (Full Posix Time Zone String)
bool rstudio::launcher_plugins::system::DateTime::operator!= | ( | const DateTime & | in_other | ) | const |
DateTime rstudio::launcher_plugins::system::DateTime::operator+ | ( | const TimeDuration & | in_intervalTime | ) | const |
Adds the given TimeDuration to a copy of this DateTime.
in_intervalTime | The interval time to add to this DateTime. |
DateTime& rstudio::launcher_plugins::system::DateTime::operator+= | ( | const TimeDuration & | in_intervalTime | ) |
Adds the given TimeDuration to this DateTime.
in_intervalTime | The interval time to add to this DateTime. |
TimeDuration rstudio::launcher_plugins::system::DateTime::operator- | ( | const DateTime & | in_other | ) | const |
Subtracts two DateTimes to produce an TimeDuration.
in_other | The date time to subtract from this. |
DateTime rstudio::launcher_plugins::system::DateTime::operator- | ( | const TimeDuration & | in_intervalTime | ) | const |
Subtracts the given TimeDuration from a copy of this DateTime.
in_intervalTime | The interval time to subtract from this DateTime. |
DateTime& rstudio::launcher_plugins::system::DateTime::operator-= | ( | const TimeDuration & | in_intervalTime | ) |
Subtracts the given TimeDuration from this DateTime.
in_intervalTime | The interval time to subtract from this DateTime. |
bool rstudio::launcher_plugins::system::DateTime::operator< | ( | const DateTime & | in_other | ) | const |
bool rstudio::launcher_plugins::system::DateTime::operator<= | ( | const DateTime & | in_other | ) | const |
bool rstudio::launcher_plugins::system::DateTime::operator== | ( | const DateTime & | in_other | ) | const |
bool rstudio::launcher_plugins::system::DateTime::operator> | ( | const DateTime & | in_other | ) | const |
bool rstudio::launcher_plugins::system::DateTime::operator>= | ( | const DateTime & | in_other | ) | const |
std::string rstudio::launcher_plugins::system::DateTime::toString | ( | ) | const |
std::string rstudio::launcher_plugins::system::DateTime::toString | ( | const char * | in_format | ) | const |
Converts this DateTime to a string representation defined by the provided format.
in_format | The time format string, as documented in the 'Date-Time Support' section of the 'Advanced Features' chapter of the RStudio Launcher Plugin SDK Developer's Guide. |
std::string rstudio::launcher_plugins::system::DateTime::toString | ( | const std::string & | in_format | ) | const |
Converts this DateTime to a string representation defined by the provided format.
in_format | The time format string, as documented in the 'Date-Time Support' section of the 'Advanced Features' chapter of the RStudio Launcher Plugin SDK Developer's Guide. |