10 #include <aws/common/date_time.h>
20 RFC822 = AWS_DATE_FORMAT_RFC822,
21 ISO_8601 = AWS_DATE_FORMAT_ISO_8601,
27 January = AWS_DATE_MONTH_JANUARY,
28 February = AWS_DATE_MONTH_FEBRUARY,
29 March = AWS_DATE_MONTH_MARCH,
30 April = AWS_DATE_MONTH_APRIL,
31 May = AWS_DATE_MONTH_MAY,
32 June = AWS_DATE_MONTH_JUNE,
33 July = AWS_DATE_MONTH_JULY,
34 August = AWS_DATE_MONTH_AUGUST,
35 September = AWS_DATE_MONTH_SEPTEMBER,
36 October = AWS_DATE_MONTH_OCTOBER,
37 November = AWS_DATE_MONTH_NOVEMBER,
43 Sunday = AWS_DATE_DAY_OF_WEEK_SUNDAY,
44 Monday = AWS_DATE_DAY_OF_WEEK_MONDAY,
45 Tuesday = AWS_DATE_DAY_OF_WEEK_TUESDAY,
46 Wednesday = AWS_DATE_DAY_OF_WEEK_WEDNESDAY,
47 Thursday = AWS_DATE_DAY_OF_WEEK_THURSDAY,
48 Friday = AWS_DATE_DAY_OF_WEEK_FRIDAY,
49 Saturday = AWS_DATE_DAY_OF_WEEK_SATURDAY,
63 DateTime(
const std::chrono::system_clock::time_point &timepointToAssign) noexcept;
68 DateTime(uint64_t millisSinceEpoch) noexcept;
73 DateTime(
double epoch_millis) noexcept;
87 DateTime operator+(
const std::chrono::milliseconds &a)
const noexcept;
88 DateTime operator-(
const std::chrono::milliseconds &a)
const noexcept;
93 DateTime &operator=(
double secondsSinceEpoch) noexcept;
98 DateTime &operator=(uint64_t millisSinceEpoch) noexcept;
103 DateTime &operator=(
const std::chrono::system_clock::time_point &timepointToAssign) noexcept;
108 DateTime &operator=(
const char *timestamp) noexcept;
110 explicit operator bool()
const noexcept;
111 int GetLastError()
const noexcept;
126 double SecondsWithMSPrecision()
const noexcept;
131 uint64_t Millis()
const noexcept;
137 std::chrono::system_clock::time_point UnderlyingTimestamp()
const noexcept;
142 uint16_t GetYear(
bool localTime =
false)
const noexcept;
147 Month GetMonth(
bool localTime =
false)
const noexcept;
153 uint8_t GetDay(
bool localTime =
false)
const noexcept;
159 DayOfWeek GetDayOfWeek(
bool localTime =
false)
const noexcept;
164 uint8_t GetHour(
bool localTime =
false)
const noexcept;
169 uint8_t GetMinute(
bool localTime =
false)
const noexcept;
174 uint8_t GetSecond(
bool localTime =
false)
const noexcept;
180 bool IsDST(
bool localTime =
false)
const noexcept;
191 std::chrono::milliseconds operator-(
const DateTime &other)
const noexcept;
194 aws_date_time m_date_time;