Imported Upstream version 1.72.0
[platform/upstream/boost.git] / boost / date_time / time_duration.hpp
index c52779b..161ee68 100644 (file)
@@ -144,10 +144,26 @@ namespace date_time {
     {
       return duration_type(ticks_ * (-1));
     }
+    duration_type abs() const
+    {
+      if ( is_negative() )
+      {
+        return invert_sign();
+      }
+      return duration_type(ticks_);
+    }
     bool is_negative() const
     {
       return ticks_ < 0;
     }
+    bool is_zero() const
+    {
+      return ticks_ == 0;
+    }
+    bool is_positive() const
+    {
+      return ticks_ > 0;
+    }
     bool operator<(const time_duration& rhs)  const
     {
       return ticks_ <  rhs.ticks_;