+ wxString FormatDate(int type = -1) const
+ {
+ static const wxChar *formats[] =
+ {
+ // MDY (week)DAY MONTH FULL EUROPEAN
+ _T("%m/%d/%Y"), _T("%A"), _T("%B"), _T("%A, %B %d, %Y"), _T("%d %B %Y")
+ };
+
+ wxString fmt = formats[type == -1 ? m_displayFormat : type];
+
+ if ( m_displayOptions & wxDATE_ABBR )
+ {
+ fmt.Replace(_T("A"), _T("a"));
+ fmt.Replace(_T("B"), _T("b"));
+ }
+ if ( m_displayOptions & wxNO_CENTURY )
+ {
+ fmt.Replace(_T("Y"), _T("y"));
+ }
+
+ return m_date.Format(fmt);
+ }
+
+protected:
+ void Init() { m_displayFormat = wxMDY; m_displayOptions = 0; }
+
+#if 0 // the old wxDate members - unused any more
+ unsigned long julian; // see julDate(); days since 1/1/4713 B.C.
+ int month; // see NMonth()
+ int day; // see Day()
+ int year; // see NYear4()
+ int day_of_week; // see NDOW(); 1 = Sunday, ... 7 = Saturday
+
+ void julian_to_mdy(); // convert julian day to mdy
+ void julian_to_wday(); // convert julian day to day_of_week
+ void mdy_to_julian(); // convert mdy to julian day
+#endif // 0
+
+private:
+ wxDateTime m_date;
+
+ int m_displayFormat;
+ int m_displayOptions;
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxDate)