+// the test data
+struct Date
+{
+ wxDateTime::wxDateTime_t day;
+ wxDateTime::Month month;
+ int year;
+ wxDateTime::wxDateTime_t hour, min, sec;
+ double jdn;
+ time_t gmticks, ticks;
+
+ void Init(const wxDateTime::Tm& tm)
+ {
+ day = tm.mday;
+ month = tm.mon;
+ year = tm.year;
+ hour = tm.hour;
+ min = tm.min;
+ sec = tm.sec;
+ jdn = 0.0;
+ gmticks = ticks = -1;
+ }
+
+ wxDateTime DT() const
+ { return wxDateTime(day, month, year, hour, min, sec); }
+
+ wxString Format() const
+ {
+ wxString s;
+ s.Printf("%02d:%02d:%02d %10s %02d, %4d%s",
+ hour, min, sec,
+ wxDateTime::GetMonthName(month).c_str(),
+ day,
+ abs(wxDateTime::ConvertYearToBC(year)),
+ year > 0 ? "AD" : "BC");
+ return s;
+ }
+};
+
+static const Date testDates[] =
+{
+ { 1, wxDateTime::Jan, 1970, 00, 00, 00, 2440587.5, 0, -3600 },
+ { 21, wxDateTime::Jan, 2222, 00, 00, 00, 2532648.5, -1, -1 },
+ { 29, wxDateTime::May, 1976, 12, 00, 00, 2442928.0, 202219200, 202212000 },
+ { 29, wxDateTime::Feb, 1976, 00, 00, 00, 2442837.5, 194400000, 194396400 },
+ { 1, wxDateTime::Jan, 1900, 12, 00, 00, 2415021.0, -1, -1 },
+ { 1, wxDateTime::Jan, 1900, 00, 00, 00, 2415020.5, -1, -1 },
+ { 15, wxDateTime::Oct, 1582, 00, 00, 00, 2299160.5, -1, -1 },
+ { 4, wxDateTime::Oct, 1582, 00, 00, 00, 2299149.5, -1, -1 },
+ { 1, wxDateTime::Mar, 1, 00, 00, 00, 1721484.5, -1, -1 },
+ { 1, wxDateTime::Jan, 1, 00, 00, 00, 1721425.5, -1, -1 },
+ { 31, wxDateTime::Dec, 0, 00, 00, 00, 1721424.5, -1, -1 },
+ { 1, wxDateTime::Jan, 0, 00, 00, 00, 1721059.5, -1, -1 },
+ { 12, wxDateTime::Aug, -1234, 00, 00, 00, 1270573.5, -1, -1 },
+ { 12, wxDateTime::Aug, -4000, 00, 00, 00, 260313.5, -1, -1 },
+ { 24, wxDateTime::Nov, -4713, 00, 00, 00, -0.5, -1, -1 },
+};
+