A standard way of determining the date and the time.
More...
#include <DateTime.h>
|
| DateTime () |
| Set up a default date and time.
|
|
void | Init () |
| Initialize the date and time.
|
|
auto | operator< (const DateTime &other) const -> bool |
| Determine if this DateTime is less than some other time.
|
|
auto | operator> (const DateTime &other) const -> bool |
| Determine if this DateTime is greater than some other time.
|
|
auto | operator== (const DateTime &other) const -> bool |
| Determine if this DateTime is equal to some other time.
|
|
auto | operator!= (const DateTime &other) const -> bool |
| Determine if this DateTime is not equal to some other time.
|
|
auto | operator<= (const DateTime &other) const -> bool |
| Determine if this DateTime is less than or equal to some other time.
|
|
auto | operator>= (const DateTime &other) const -> bool |
| Determine if this DateTime is greater than or equal to some other time.
|
|
void | StripTime () |
| Remove the time portion from the date.
|
|
auto | GetString () const -> std::string |
| Retrieve a string representation of the current date and time.
|
|
auto | FromString (const std::string &sDateTime) -> bool |
| Attempt to turn a string into a DateTime.
|
|
|
int | tm_sec |
| The number of seconds after the minute.
|
|
int | tm_min |
| The number of minutes after the hour.
|
|
int | tm_hour |
| The number of hours since midnight (or 0000 hours).
|
|
int | tm_mday |
| The specified day of the current month.
|
|
int | tm_mon |
| The number of months since January.
|
|
int | tm_year |
| The number of years since the year 1900.
|
|
A standard way of determining the date and the time.
◆ FromString()
bool DateTime::FromString |
( |
const std::string & |
sDateTime | ) |
-> bool |
Attempt to turn a string into a DateTime.
- Parameters
-
sDateTime | the string to attempt to convert. |
- Returns
- true if the conversion worked, or false otherwise.
◆ GetNowDate()
Retrieve the current date.
- Returns
- the current date.
◆ GetNowDateTime()
Retrieve the current date and time.
- Returns
- the current date and time.
◆ GetString()
std::string DateTime::GetString |
( |
| ) |
const -> std::string |
Retrieve a string representation of the current date and time.
This returns a common SQL/XML format: "YYYY-MM-DD HH:MM:SS".
- Returns
- the string representation of the date and time.
◆ operator!=()
auto DateTime::operator!= |
( |
const DateTime & |
other | ) |
const -> bool
|
|
inline |
Determine if this DateTime is not equal to some other time.
- Parameters
-
- Returns
- true if this is not equal to the other time, or false otherwise.
◆ operator<()
bool DateTime::operator< |
( |
const DateTime & |
other | ) |
const -> bool |
Determine if this DateTime is less than some other time.
- Parameters
-
- Returns
- true if this is less than the other time, or false otherwise.
◆ operator<=()
auto DateTime::operator<= |
( |
const DateTime & |
other | ) |
const -> bool
|
|
inline |
Determine if this DateTime is less than or equal to some other time.
- Parameters
-
- Returns
- true if this is less than or equal to the other time, or false otherwise.
◆ operator==()
bool DateTime::operator== |
( |
const DateTime & |
other | ) |
const -> bool |
Determine if this DateTime is equal to some other time.
- Parameters
-
- Returns
- true if this is equal to the other time, or false otherwise.
◆ operator>()
bool DateTime::operator> |
( |
const DateTime & |
other | ) |
const -> bool |
Determine if this DateTime is greater than some other time.
- Parameters
-
- Returns
- true if this is greater than the other time, or false otherwise.
◆ operator>=()
auto DateTime::operator>= |
( |
const DateTime & |
other | ) |
const -> bool
|
|
inline |
Determine if this DateTime is greater than or equal to some other time.
- Parameters
-
- Returns
- true if this is greater than or equal to the other time, or false otherwise.
◆ tm_hour
The number of hours since midnight (or 0000 hours).
Valid values are [0, 23].
◆ tm_mday
The specified day of the current month.
Valid values are [1, 31].
XXX: Is it possible to set an illegal date through here, such as day 30 of February? -Wolfman2000
◆ tm_min
The number of minutes after the hour.
Valid values are [0, 59].
◆ tm_mon
The number of months since January.
Valid values are [0, 11].
◆ tm_sec
The number of seconds after the minute.
Valid values are [0, 59].
The documentation for this struct was generated from the following files:
- /home/runner/work/etterna/etterna/src/Etterna/Models/Misc/DateTime.h
- /home/runner/work/etterna/etterna/src/Etterna/Models/Misc/DateTime.cpp