}
}
+bool Date::is_last_day_of_month() {
+ bool ret_val;
+ int days_in_month;
+
+ days_in_month = -1;
+ if ((month > 0) &&
+ (month <= 12)) {
+ days_in_month = CONST__DAYS_PER_MONTH[month - 1];
+ if ((month == 2) &&
+ (is_leap_year() == true)) {
+ days_in_month = 29;
+ }
+ }
+ ret_val = (day == days_in_month);
+ //log_debug("ret_val: %d", ret_val);
+ return ret_val;
+}
+
void Date::next_day() {
if ((month > 0) &&
(month <= 12)) {
}
string Date::to_string() {
- char buffer[30];
string ret_val;
+ char buffer[40];
sprintf(buffer, "%04d-%02d-%02d %02d:%02d:%02d", year, month, day, hour, min, sec);
ret_val = buffer;