8StringToDayInYear(
const std::string& sDayInYear) -> int;
11const int NUM_LAST_DAYS = 7;
13const int NUM_LAST_WEEKS = 52;
18const int DAYS_IN_YEAR = 366;
21const int HOURS_IN_DAY = 24;
24const int DAYS_IN_WEEK = 7;
44DayInYearToString(
int iDayInYearIndex) -> std::string;
46LastDayToString(
int iLastDayIndex) -> std::string;
48LastDayToLocalizedString(
int iLastDayIndex) -> std::string;
50DayOfWeekToString(
int iDayOfWeekIndex) -> std::string;
52DayOfWeekToLocalizedString(
int iDayOfWeekIndex) -> std::string;
54HourInDayToString(
int iHourIndex) -> std::string;
56HourInDayToLocalizedString(
int iHourIndex) -> std::string;
58MonthToString(Month month) ->
const std::string&;
60MonthToLocalizedString(Month month) ->
const std::string&;
62LastWeekToString(
int iLastWeekIndex) -> std::string;
64LastWeekToLocalizedString(
int iLastWeekIndex) -> std::string;
68AddDays(tm start,
int iDaysToMove) -> tm;
70GetYesterday(tm start) -> tm;
72GetDayOfWeek(tm time) -> int;
74GetNextSunday(tm start) -> tm;
77GetDayInYearAndYear(
int iDayInYearIndex,
int iYear) -> tm;
174 static auto GetFromString(
const std::string& str) ->
DateTime;
176 static auto GetYesterday() ->
DateTime;
186 [[nodiscard]]
auto GetString() const -> std::
string;
192 auto
FromString(const std::
string& sDateTime) ->
bool;
A standard way of determining the date and the time.
Definition DateTime.h:81
int tm_mday
The specified day of the current month.
Definition DateTime.h:104
int tm_mon
The number of months since January.
Definition DateTime.h:109
auto FromString(const std::string &sDateTime) -> bool
Attempt to turn a string into a DateTime.
Definition DateTime.cpp:127
int tm_sec
The number of seconds after the minute.
Definition DateTime.h:86
DateTime()
Set up a default date and time.
Definition DateTime.cpp:10
int tm_hour
The number of hours since midnight (or 0000 hours).
Definition DateTime.h:96
static auto GetNowDateTime() -> DateTime
Retrieve the current date and time.
Definition DateTime.cpp:72
int tm_min
The number of minutes after the hour.
Definition DateTime.h:91
static auto GetNowDate() -> DateTime
Retrieve the current date.
Definition DateTime.cpp:90
int tm_year
The number of years since the year 1900.
Definition DateTime.h:111
auto operator>=(const DateTime &other) const -> bool
Determine if this DateTime is greater than or equal to some other time.
Definition DateTime.h:160
auto operator==(const DateTime &other) const -> bool
Determine if this DateTime is equal to some other time.
Definition DateTime.cpp:39
void StripTime()
Remove the time portion from the date.
Definition DateTime.cpp:106
auto GetString() const -> std::string
Retrieve a string representation of the current date and time.
Definition DateTime.cpp:115
void Init()
Initialize the date and time.
Definition DateTime.cpp:16
auto operator<(const DateTime &other) const -> bool
Determine if this DateTime is less than some other time.
Definition DateTime.cpp:22
auto operator>(const DateTime &other) const -> bool
Determine if this DateTime is greater than some other time.
Definition DateTime.cpp:55
auto operator!=(const DateTime &other) const -> bool
Determine if this DateTime is not equal to some other time.
Definition DateTime.h:139
auto operator<=(const DateTime &other) const -> bool
Determine if this DateTime is less than or equal to some other time.
Definition DateTime.h:149