]> pilppa.org Git - lib1wire.git/blob - src/Date.hh
2d6fd757723a92d200b61a124383e0e04ba6fc7a
[lib1wire.git] / src / Date.hh
1 /*
2  * Date.hh
3  *
4  *  Created on: Dec 7, 2010
5  *      Author: lamikr
6  */
7
8 #ifndef DATE_HH_
9 #define DATE_HH_
10
11 #include <string>
12
13 namespace plp {
14         class Date {
15                 public:
16                         Date();
17                         Date(int year_param,
18                              int month_param,
19                              int day_param,
20                              int hour_param,
21                              int min_param,
22                              int sec_param);
23                         virtual ~Date();
24                         void printout();
25                         bool is_leap_year();
26                         void tomorrow();
27                         void next_hour();
28                         void inc_minutes(int minutes);
29                         void inc_seconds(int seconds);
30                         Date *clone();
31                         void copy(Date *date);
32                         bool before(Date date2);
33                         bool equals(Date date2);
34                         std::string to_string();
35
36                         int     year;
37                         int     month;
38                         int     day;
39                         int     hour;
40                         int     min;
41                         int     sec;
42                 private:
43                         //static const int arr_days_per_month[];
44         };
45 }
46
47 #endif /* DATE_HH_ */