X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f41cb81efc453b1da2e29078ef95c64016532cf3..52c71b808f1c7fd161bb0bc5082683320f15dbb2:/include/wx/datetime.inl diff --git a/include/wx/datetime.inl b/include/wx/datetime.inl index 450a11fc13..398b02828b 100644 --- a/include/wx/datetime.inl +++ b/include/wx/datetime.inl @@ -54,12 +54,12 @@ inline wxDateTime wxDateTime::Now() /* static */ inline wxDateTime wxDateTime::Today() { - struct tm *tm = GetTmNow(); - tm->tm_hour = - tm->tm_min = - tm->tm_sec = 0; + struct tm *time = GetTmNow(); + time->tm_hour = 0; + time->tm_min = 0; + time->tm_sec = 0; - return wxDateTime(*tm); + return wxDateTime(*time); } #if (!(defined(__VISAGECPP__) && __IBMCPP__ >= 400)) @@ -149,14 +149,15 @@ inline time_t wxDateTime::GetTicks() const return (time_t)((m_time / (long)TIME_T_FACTOR).GetLo())+WX_TIME_BASE_OFFSET ; } -bool wxDateTime::SetToLastWeekDay(WeekDay weekday, +inline bool wxDateTime::SetToLastWeekDay(WeekDay weekday, Month month, int year) { return SetToWeekDay(weekday, -1, month, year); } -inline wxDateTime wxDateTime::GetWeekDayInSameWeek(WeekDay weekday) const +inline wxDateTime wxDateTime::GetWeekDayInSameWeek(WeekDay weekday, + WeekFlags flags) const { MODIFY_AND_RETURN( SetToWeekDayInSameWeek(weekday) ); } @@ -191,11 +192,12 @@ inline wxDateTime wxDateTime::GetLastWeekDay(WeekDay weekday, } inline wxDateTime wxDateTime::GetWeek(wxDateTime_t numWeek, - WeekDay weekday) const + WeekDay weekday, + WeekFlags flags) const { wxDateTime dt(*this); - return dt.SetToTheWeek(numWeek, weekday) ? dt : wxInvalidDateTime; + return dt.SetToTheWeek(numWeek, weekday, flags) ? dt : wxInvalidDateTime; } inline wxDateTime wxDateTime::GetLastMonthDay(Month month, int year) const