Implemented hour addition and subtraction.
[libacl.git] / src / date.h
index 2776e12..d9d2afa 100644 (file)
@@ -247,6 +247,9 @@ class hour
       return cm;
    }
 
+   hour increase();
+   hour decrease();
+
 public:
 
    hour()
@@ -316,7 +319,30 @@ public:
 
    friend hour operator+(hour &, hour &);
    hour operator += (hour h);
+
+   hour operator ++ ()        // prefix
+   {
+      return increase();
+   }
+
+   hour operator ++ (int)     // postfix
+   {
+      return increase();
+   }
+
    friend hour operator-(hour &, hour &);
+   hour operator -= (hour h);
+
+   hour operator -- ()        // prefix
+   {
+      return decrease();
+   }
+
+   hour operator -- (int)     // postfix
+   {
+      return decrease();
+   }
+
 
    friend std::ostream& operator<<(std::ostream &, const hour &);
    friend std::istream& operator>>(std::istream &, hour &);