Date time structure type.
More...
#include <DateTime.hpp>
|
| DateTime ()=default |
| Default constructor.
|
|
| DateTime (uint8_t _second, uint8_t _minute=0u, uint8_t _hour=0u, uint8_t _day=0u, uint8_t _month=0u, uint16_t _year=0u, uint8_t _weekday=0u) noexcept |
|
| DateTime (const struct tm &_time) noexcept |
|
bool | Equals (const DateTime &_other) const noexcept |
| Compare two DateTime equality.
|
|
bool | operator== (const DateTime &_rhs) const noexcept |
| Compare two DateTime equality.
|
|
bool | operator!= (const DateTime &_rhs) const noexcept |
| Compare two DateTime inequality.
|
|
|
static DateTime | Now () noexcept |
| Get the current local date time.
|
|
static DateTime | GMNow () noexcept |
| Get the current date time at Greenwich.
|
|
static DateTime | FileStats (const std::string &_path) |
| Query file date time stats at path.
|
|
|
uint8_t | second = 0 |
| second number [0, 59].
|
|
uint8_t | minute = 0 |
| minute number [0, 59].
|
|
uint8_t | hour = 0 |
| hour number [0, 23].
|
|
uint8_t | day = 0 |
| day of the month number [1, 31].
|
|
uint8_t | month = 0 |
| month number [1, 12].
|
|
uint16_t | year = 0 |
| Year number.
|
|
uint8_t | weekday = 0 |
| day number of the week [0, 6].
|
|
Date time structure type.
◆ DateTime() [1/2]
SA::DateTime::DateTime |
( |
uint8_t | _second, |
|
|
uint8_t | _minute = 0u, |
|
|
uint8_t | _hour = 0u, |
|
|
uint8_t | _day = 0u, |
|
|
uint8_t | _month = 0u, |
|
|
uint16_t | _year = 0u, |
|
|
uint8_t | _weekday = 0u ) |
|
noexcept |
Default Value constructor.
- Parameters
-
[in] | _second | second values. |
[in] | _minute | minute values. |
[in] | _hour | hour values. |
[in] | _day | day values. |
[in] | _month | month values. |
[in] | _year | year values. |
[in] | _weekday | weekday values. |
◆ DateTime() [2/2]
SA::DateTime::DateTime |
( |
const struct tm & | _time | ) |
|
|
noexcept |
Value constructor from tm struct.
- Parameters
-
◆ Equals()
bool SA::DateTime::Equals |
( |
const DateTime & | _other | ) |
const |
|
noexcept |
Compare two DateTime equality.
- Parameters
-
[in] | _other | Other date time to compare with. |
- Returns
- Whether this and _other are equal.
◆ FileStats()
static DateTime SA::DateTime::FileStats |
( |
const std::string & | _path | ) |
|
|
static |
Query file date time stats at path.
- Parameters
-
- Returns
- DateTime stats of the file at path.
◆ GMNow()
Get the current date time at Greenwich.
- Returns
- DateTime.
◆ Now()
Get the current local date time.
- Returns
- DateTime.
◆ operator!=()
bool SA::DateTime::operator!= |
( |
const DateTime & | _rhs | ) |
const |
|
noexcept |
Compare two DateTime inequality.
- Parameters
-
[in] | _rhs | Other date time to compare with. |
- Returns
- Whether this and _other are not equal.
◆ operator==()
bool SA::DateTime::operator== |
( |
const DateTime & | _rhs | ) |
const |
|
noexcept |
Compare two DateTime equality.
- Parameters
-
[in] | _rhs | Other date time to compare with. |
- Returns
- Whether this and _other are equal.
The documentation for this struct was generated from the following file: