16 #include <nn/pia/common/common_Definitions.h>
34 : m_Year(0), m_Month(0), m_Day(0), m_Hour(0), m_Minute(0), m_Second(0), m_IsRegistered(false)
46 m_Month = rhs.m_Month;
49 m_Minute = rhs.m_Minute;
50 m_Second = rhs.m_Second;
51 m_IsRegistered = rhs.m_IsRegistered;
64 DateTime(uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second)
72 m_IsRegistered =
true;
82 m_Month = rhs.m_Month;
85 m_Minute = rhs.m_Minute;
86 m_Second = rhs.m_Second;
87 m_IsRegistered = rhs.m_IsRegistered;
99 m_IsRegistered =
true;
119 m_IsRegistered =
true;
139 m_IsRegistered =
true;
159 m_IsRegistered =
true;
179 m_IsRegistered =
true;
199 m_IsRegistered =
true;
217 return m_IsRegistered;
226 if (m_Year == 0 || m_Year > 9999)
230 if (m_Month == 0 || m_Month > 12)
238 else if (m_Month == 2)
240 uint8_t days = (m_Year % 400 == 0 || (m_Year % 100 != 0 && m_Year % 4 == 0)) ? 29 : 28;
246 else if (m_Month == 4 || m_Month == 6 || m_Month == 9 || m_Month == 11)
286 m_IsRegistered =
false;
295 return (static_cast<uint64_t>(m_Year) << 40) |
296 (
static_cast<uint64_t
>(m_Month) << 32) |
297 (
static_cast<uint64_t
>(m_Day) << 24) |
298 (
static_cast<uint64_t
>(m_Hour) << 16) |
299 (
static_cast<uint64_t
>(m_Minute) << 8) |
300 (
static_cast<uint64_t
>(m_Second));