From: Loof, D. <dl...@us...> - 2005-01-19 16:26:12
|
Update of /cvsroot/pclasses/pclasses2/include/pclasses In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12012/include/pclasses Modified Files: Date.h Log Message: add operators +, -, +=, -= Index: Date.h =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/Date.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Date.h 27 Dec 2004 05:33:16 -0000 1.2 +++ Date.h 19 Jan 2005 16:25:58 -0000 1.3 @@ -22,6 +22,7 @@ #define P_Date_h #include <pclasses/Exception.h> +#include <pclasses/TimeSpan.h> #include <iostream> namespace P { @@ -99,6 +100,12 @@ bool operator<=(const Date& d) const throw(); bool operator==(const Date& d) const throw(); bool operator!=(const Date& d) const throw(); + + Date& operator+=(const TimeSpan& sp) throw(); + Date& operator-=(const TimeSpan& sp) throw(); + + friend Date operator+(const Date& d, const TimeSpan& sp) throw(); + friend Date operator-(const Date& d, const TimeSpan& sp) throw(); //! Returns the number of days in month static unsigned int daysInMonth(unsigned int month, unsigned int year) |