+inline bool wxDateTime::IsSameDate(const wxDateTime& dt) const
+{
+ 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
+{
+ // notice that we can't do something like this:
+ //
+ // m_time % MILLISECONDS_PER_DAY == dt.m_time % MILLISECONDS_PER_DAY
+ //
+ // because we have also to deal with (possibly) different DST settings!
+ Tm tm1 = GetTm(),
+ tm2 = dt.GetTm();
+
+ return tm1.hour == tm2.hour &&
+ tm1.min == tm2.min &&
+ tm1.sec == tm2.sec &&
+ tm1.msec == tm2.msec;
+}
+
+inline bool wxDateTime::IsEqualUpTo(const wxDateTime& dt,
+ const wxTimeSpan& ts) const
+{
+ return IsBetween(dt.Subtract(ts), dt.Add(ts));
+}
+