#include "core/fxcrt/cfx_datetime.h"
#include "build/build_config.h"
#include "core/fxcrt/check.h"
#include "core/fxcrt/fx_extension.h"
#include "core/fxcrt/fx_system.h"
#include "core/fxcrt/span.h"
namespace {
constexpr uint8_t kDaysPerMonth[12] = …;
constexpr uint8_t kDaysPerLeapMonth[12] = …;
constexpr int32_t kDaysBeforeMonth[12] = …;
constexpr int32_t kDaysBeforeLeapMonth[12] = …;
constexpr int32_t kDaysPerYear = …;
constexpr int32_t kDaysPerLeapYear = …;
int32_t DaysBeforeMonthInYear(int32_t iYear, uint8_t iMonth) { … }
int32_t DaysInYear(int32_t iYear) { … }
int64_t DateToDays(int32_t iYear,
uint8_t iMonth,
uint8_t iDay,
bool bIncludeThisDay) { … }
}
uint8_t FX_DaysInMonth(int32_t iYear, uint8_t iMonth) { … }
bool FX_IsLeapYear(int32_t iYear) { … }
CFX_DateTime CFX_DateTime::Now() { … }
int32_t CFX_DateTime::GetDayOfWeek() const { … }
bool CFX_DateTime::operator==(const CFX_DateTime& other) const { … }