aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/google/protobuf/stubs/time.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/google/protobuf/stubs/time.cc b/src/google/protobuf/stubs/time.cc
index 49c0412c..6def637e 100644
--- a/src/google/protobuf/stubs/time.cc
+++ b/src/google/protobuf/stubs/time.cc
@@ -80,9 +80,9 @@ bool ValidateDateTime(const DateTime& time) {
return false;
}
if (time.month == 2 && IsLeapYear(time.year)) {
- return time.month <= kDaysInMonth[time.month] + 1;
+ return time.day <= kDaysInMonth[time.month] + 1;
} else {
- return time.month <= kDaysInMonth[time.month];
+ return time.day <= kDaysInMonth[time.month];
}
}