X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/16ee521a22ea11720638c55059957f7ad63ee151..794bcc2dea743ac907b839f54e451847c9ea4b72:/include/wx/datetime.h diff --git a/include/wx/datetime.h b/include/wx/datetime.h index 3410ccafa3..1d7a329e67 100644 --- a/include/wx/datetime.h +++ b/include/wx/datetime.h @@ -397,7 +397,7 @@ public: // NB: this struct should always be kept normalized (i.e. mon should // be < 12, 1 <= day <= 31 &c), so use AddMonths(), AddDays() // instead of modifying the member fields directly! - struct Tm + struct WXDLLEXPORT Tm { wxDateTime_t msec, sec, min, hour, mday; Month mon; @@ -972,23 +972,23 @@ public: // ------------------------------------------------------------------------ // return the timespan for the given number of seconds - static wxTimeSpan Seconds(int sec) { return wxTimeSpan(0, 0, sec); } + static wxTimeSpan Seconds(long sec) { return wxTimeSpan(0, 0, sec); } static wxTimeSpan Second() { return Seconds(1); } // return the timespan for the given number of minutes - static wxTimeSpan Minutes(int min) { return wxTimeSpan(0, min, 0 ); } + static wxTimeSpan Minutes(long min) { return wxTimeSpan(0, min, 0 ); } static wxTimeSpan Minute() { return Minutes(1); } // return the timespan for the given number of hours - static wxTimeSpan Hours(int hours) { return wxTimeSpan(hours, 0, 0); } + static wxTimeSpan Hours(long hours) { return wxTimeSpan(hours, 0, 0); } static wxTimeSpan Hour() { return Hours(1); } // return the timespan for the given number of days - static wxTimeSpan Days(int days) { return Hours(24 * days); } + static wxTimeSpan Days(long days) { return Hours(24 * days); } static wxTimeSpan Day() { return Days(1); } // return the timespan for the given number of weeks - static wxTimeSpan Weeks(int days) { return Days(7 * days); } + static wxTimeSpan Weeks(long days) { return Days(7 * days); } static wxTimeSpan Week() { return Weeks(1); } // default ctor constructs the 0 time span @@ -997,10 +997,10 @@ public: // from separate values for each component, date set to 0 (hours are // not restricted to 0..24 range, neither are minutes, seconds or // milliseconds) - inline wxTimeSpan(int hours, - int minutes = 0, - int seconds = 0, - int milliseconds = 0); + inline wxTimeSpan(long hours, + long minutes = 0, + long seconds = 0, + long milliseconds = 0); // default copy ctor is ok @@ -1257,10 +1257,12 @@ WX_DECLARE_OBJARRAY(wxDateTime, wxDateTimeArray); // ---------------------------------------------------------------------------- class WXDLLEXPORT wxDateTimeHolidayAuthority; -WX_DEFINE_ARRAY(wxDateTimeHolidayAuthority *, wxHolidayAuthoritiesArray); +WX_DEFINE_EXPORTED_ARRAY(wxDateTimeHolidayAuthority *, wxHolidayAuthoritiesArray); +class wxDateTimeHolidaysModule; class WXDLLEXPORT wxDateTimeHolidayAuthority { + friend wxDateTimeHolidaysModule; public: // returns TRUE if the given date is a holiday static bool IsHoliday(const wxDateTime& dt);