20 #include <aws/common/date_time.h>
30 RFC822 = AWS_DATE_FORMAT_RFC822,
37 January = AWS_DATE_MONTH_JANUARY,
39 March = AWS_DATE_MONTH_MARCH,
40 April = AWS_DATE_MONTH_APRIL,
41 May = AWS_DATE_MONTH_MAY,
42 June = AWS_DATE_MONTH_JUNE,
43 July = AWS_DATE_MONTH_JULY,
44 August = AWS_DATE_MONTH_AUGUST,
46 October = AWS_DATE_MONTH_OCTOBER,
53 Sunday = AWS_DATE_DAY_OF_WEEK_SUNDAY,
54 Monday = AWS_DATE_DAY_OF_WEEK_MONDAY,
55 Tuesday = AWS_DATE_DAY_OF_WEEK_TUESDAY,
56 Wednesday = AWS_DATE_DAY_OF_WEEK_WEDNESDAY,
57 Thursday = AWS_DATE_DAY_OF_WEEK_THURSDAY,
58 Friday = AWS_DATE_DAY_OF_WEEK_FRIDAY,
59 Saturday = AWS_DATE_DAY_OF_WEEK_SATURDAY,
73 DateTime(
const std::chrono::system_clock::time_point &timepointToAssign) noexcept;
78 DateTime(uint64_t millisSinceEpoch) noexcept;
83 DateTime(
double epoch_millis) noexcept;
90 bool operator==(
const DateTime &other)
const noexcept;
91 bool operator<(
const DateTime &other)
const noexcept;
92 bool operator>(
const DateTime &other)
const noexcept;
93 bool operator!=(
const DateTime &other)
const noexcept;
94 bool operator<=(
const DateTime &other)
const noexcept;
95 bool operator>=(
const DateTime &other)
const noexcept;
97 DateTime operator+(
const std::chrono::milliseconds &
a)
const noexcept;
98 DateTime operator-(
const std::chrono::milliseconds &
a)
const noexcept;
103 DateTime &operator=(
double secondsSinceEpoch) noexcept;
108 DateTime &operator=(uint64_t millisSinceEpoch) noexcept;
113 DateTime &operator=(
const std::chrono::system_clock::time_point &timepointToAssign) noexcept;
118 DateTime &operator=(
const char *timestamp) noexcept;
120 explicit operator bool()
const noexcept;
121 int GetLastError()
const noexcept;
136 double SecondsWithMSPrecision()
const noexcept;
141 uint64_t Millis()
const noexcept;
147 std::chrono::system_clock::time_point UnderlyingTimestamp()
const noexcept;
152 uint16_t GetYear(
bool localTime =
false)
const noexcept;
157 Month GetMonth(
bool localTime =
false)
const noexcept;
163 uint8_t GetDay(
bool localTime =
false)
const noexcept;
169 DayOfWeek GetDayOfWeek(
bool localTime =
false)
const noexcept;
174 uint8_t GetHour(
bool localTime =
false)
const noexcept;
179 uint8_t GetMinute(
bool localTime =
false)
const noexcept;
184 uint8_t GetSecond(
bool localTime =
false)
const noexcept;
190 bool IsDST(
bool localTime =
false)
const noexcept;
201 std::chrono::milliseconds operator-(
const DateTime &other)
const noexcept;
204 aws_date_time m_date_time;