X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/47d67540a017101b3e46abe9ef0f55914d8de37e..dface61ccba162c922b25d18aca2ebc4e6f03312:/src/common/time.cpp diff --git a/src/common/time.cpp b/src/common/time.cpp index ecd30b9ac0..3d458c4e6d 100644 --- a/src/common/time.cpp +++ b/src/common/time.cpp @@ -27,7 +27,7 @@ seconds since January 1, 1901, GMT. #include "wx/setup.h" -#if wxUSE_TIMEDATE +#ifdef wxUSE_TIMEDATE #include "wx/time.h" #include "wx/date.h" @@ -36,11 +36,15 @@ seconds since January 1, 1901, GMT. #if wxUSE_IOSTREAMH #include +#include #else #include +#include +# ifdef _MSC_VER + using namespace std; +# endif #endif -#include #include #if !USE_SHARED_LIBRARY @@ -267,6 +271,38 @@ secondTy wxTime::GetSecond() const return (secondTy)(((sec % 86400) % 3600) % 60); } +secondTy wxTime::GetSecondGMT() const +/* + Return the minute of this wxTime in GMT. +*/ +{ + return (secondTy)(((sec % 86400) % 3600) % 60); +} + +int wxTime::GetDay() const +{ + wxDate da((wxDate) *this); + return da.GetDay(); +} + +int wxTime::GetDayOfWeek() const +{ + wxDate da((wxDate) *this); + return da.GetDayOfWeek(); +} + +int wxTime::GetMonth() const +{ + wxDate da((wxDate) *this); + return da.GetMonth(); +} + +int wxTime::GetYear() const +{ + wxDate da((wxDate) *this); + return da.GetYear(); +} + wxTime wxTime::Max(const wxTime& t) const { if (t < *this) return *this;