X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5b781a6729859abc77e6ca5b1f81cbaad974a78f..0ea48a1f23b2c9763778f60405f051cac8bf781b:/include/wx/datetime.inl?ds=sidebyside diff --git a/include/wx/datetime.inl b/include/wx/datetime.inl index 3089b32111..450a11fc13 100644 --- a/include/wx/datetime.inl +++ b/include/wx/datetime.inl @@ -249,7 +249,12 @@ inline bool wxDateTime::IsBetween(const wxDateTime& t1, inline bool wxDateTime::IsSameDate(const wxDateTime& dt) const { - return (m_time - dt.m_time).Abs() < MILLISECONDS_PER_DAY; + Tm tm1 = GetTm(), + tm2 = dt.GetTm(); + + return tm1.year == tm2.year && + tm1.mon == tm2.mon && + tm1.mday == tm2.mday; } inline bool wxDateTime::IsSameTime(const wxDateTime& dt) const