+inline bool wxTimeSpan::IsLongerThan(const wxTimeSpan& ts) const
+{
+ return GetValue().Abs() > ts.GetValue().Abs();
+}
+
+// ----------------------------------------------------------------------------
+// wxDateSpan
+// ----------------------------------------------------------------------------
+
+inline wxDateSpan& wxDateSpan::operator+=(const wxDateSpan& other)
+{
+ m_years += other.m_years;
+ m_months += other.m_months;
+ m_weeks += other.m_weeks;
+ m_days += other.m_days;
+
+ return *this;
+}
+
+inline wxDateSpan& wxDateSpan::Add(const wxDateSpan& other)
+{
+ return *this += other;
+}
+
+inline wxDateSpan wxDateSpan::Add(const wxDateSpan& other) const
+{
+ wxDateSpan ds(*this);
+ ds.Add(other);
+ return ds;
+}
+
+inline wxDateSpan& wxDateSpan::Multiply(int factor)
+{
+ m_years *= factor;
+ m_months *= factor;
+ m_weeks *= factor;
+ m_days *= factor;
+
+ return *this;
+}
+
+inline wxDateSpan wxDateSpan::Multiply(int factor) const
+{
+ wxDateSpan ds(*this);
+ ds.Multiply(factor);
+ return ds;
+}
+
+inline wxDateSpan wxDateSpan::Negate() const
+{
+ return wxDateSpan(-m_years, -m_months, -m_weeks, -m_days);
+}
+
+inline wxDateSpan& wxDateSpan::Neg()
+{
+ m_years = -m_years;
+ m_months = -m_months;
+ m_weeks = -m_weeks;
+ m_days = -m_days;
+
+ return *this;
+}
+
+inline wxDateSpan& wxDateSpan::operator-=(const wxDateSpan& other)
+{
+ return *this += other.Negate();
+}
+
+inline wxDateSpan& wxDateSpan::Subtract(const wxDateSpan& other)
+{
+ return *this -= other;
+}
+
+inline wxDateSpan wxDateSpan::Subtract(const wxDateSpan& other) const
+{
+ wxDateSpan ds(*this);
+ ds.Subtract(other);
+ return ds;
+}
+
+#undef MILLISECONDS_PER_DAY
+
+#undef MODIFY_AND_RETURN
+
+// ============================================================================
+// binary operators
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// wxTimeSpan operators
+// ----------------------------------------------------------------------------
+
+wxTimeSpan WXDLLIMPEXP_BASE operator*(int n, const wxTimeSpan& ts);
+
+// ----------------------------------------------------------------------------
+// wxDateSpan
+// ----------------------------------------------------------------------------
+
+wxDateSpan WXDLLIMPEXP_BASE operator*(int n, const wxDateSpan& ds);
+
+// ============================================================================
+// other helper functions
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// iteration helpers: can be used to write a for loop over enum variable like
+// this:
+// for ( m = wxDateTime::Jan; m < wxDateTime::Inv_Month; wxNextMonth(m) )
+// ----------------------------------------------------------------------------
+
+WXDLLIMPEXP_BASE void wxNextMonth(wxDateTime::Month& m);
+WXDLLIMPEXP_BASE void wxPrevMonth(wxDateTime::Month& m);
+WXDLLIMPEXP_BASE void wxNextWDay(wxDateTime::WeekDay& wd);
+WXDLLIMPEXP_BASE void wxPrevWDay(wxDateTime::WeekDay& wd);
+
+#endif // wxUSE_DATETIME
+