49struct Date:
public GblDate {
50 static bool isLeapYear(Year year);
51 static Day monthDays(Month month, Year year);
52 static const char* monthStr(Month month);
53 static const char* monthStrShort(Month month);
54 static const char* weekDayStr(WeekDay weekday);
55 static const char* weekDayStrShort(WeekDay weekday);
57 static Date fromJulian(Day julianDate);
58 static Date fromOrdinal(Year year, Day day);
60 void set(Year year, Month month, Day day);
65 WeekDay weekDay()
const;
67 uint8_t yearWeek()
const;
81 static DateTime fromUnix(std::time_t epoch);
82 static DateTime fromSpecUtc(TimeSpec spec);
83 static DateTime fromLocal(
const std::tm& local);
84 static DateTime fromUtc(
const std::tm& utc);
87 static DateTime parse(
const char* pString,
const char* pFormat);
89 std::time_t toUnix()
const;
90 TimeSpec toSpecUtc()
const;
91 void toLocal(std::tm* pBrokenDown)
const;
92 void toUtc(std::tm* pBrokenDown)
const;
93 std::string toIso8601(
void)
const;
94 std::string format(
const char* pFmt)
const;
99 Month month = Month::January,
107 void setDate(
const Date& other);
108 void setTime(
const Time& other);
110 bool isValid()
const;
112 bool isLocal()
const;