libi2ncommon: (gerd) improve WEEK interface
authorGerd v. Egidy <gerd.von.egidy@intra2net.com>
Fri, 3 Sep 2004 10:35:07 +0000 (10:35 +0000)
committerGerd v. Egidy <gerd.von.egidy@intra2net.com>
Fri, 3 Sep 2004 10:35:07 +0000 (10:35 +0000)
src/timefunc.hxx

index af7d71d..c4a5436 100644 (file)
@@ -50,6 +50,14 @@ class WEEK
             
         operator std::bitset<7>() const
             { return days; }
+            
+        void set(WEEKDAY d, bool value=true)
+            { days[d]=value; }
+        
+        bool all_set() const
+            { return (days.count()==7); }
+        bool none_set() const
+            { return days.none(); }
         
         std::string get_daystring() const;
         std::string get_displaystring() const;