]> pilppa.org Git - lib1wire.git/blobdiff - src/Date.hh
Optimization for year and monthly data calculation.
[lib1wire.git] / src / Date.hh
index b2b908d38fbe2532b6b6e45dda778ea8e6ae95c7..f218c9a952c1339a60b173b56457685e83847b2d 100644 (file)
@@ -23,20 +23,36 @@ namespace plp {
                        virtual ~Date();
                        void printout();
                        bool is_leap_year();
-                       void tomorrow();
+                       void next_second();
+                       void next_min();
+                       void next_hour();
+                       void next_day();
+                       void next_month();
+                       void next_year();
+                       void inc_minutes(int minutes);
+                       void inc_seconds(int seconds);
                        Date *clone();
                        void copy(Date *date);
-                       bool before(Date date2);
-                       bool equals(Date date2);
-                       std::string to_string();
-
+                       bool before(Date *date2);
+                       bool equals(Date *date2);
+                       bool before_or_equal(Date *date2);
+                       bool before_or_equal_year(Date *date2);
+                       bool before_or_equal_month(Date *date2);
+                       bool before_or_equal_day(Date *date2);
+                       bool before_or_equal_hour(Date *date2);
+                       bool before_or_equal_min(Date *date2);
                        int     year;
                        int     month;
                        int     day;
                        int     hour;
                        int     min;
                        int     sec;
-               private:
+                       std::string to_string();
+               protected:
+                       std::string to_sortable_string();
+                       std::string to_sortable_day_string();
+                       std::string to_sortable_hour_string();
+                       std::string to_sortable_min_string();
                        //static const int arr_days_per_month[];
        };
 }