Skip to content

Commit

Permalink
catch all leap year cases
Browse files Browse the repository at this point in the history
  • Loading branch information
goatshriek committed Mar 1, 2020
1 parent 18f99dc commit 259ec10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/function/rfc5424.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ void TestRFC5424Compliance(const char *syslog_msg){
EXPECT_LE(day, 30);
break;
case 2:
if(year % 4 == 0){
if((year % 4 == 0 && year % 100 != 0) || year % 400 == 0){
EXPECT_LE(day, 29);
} else {
EXPECT_LE(day, 28);
Expand Down

0 comments on commit 259ec10

Please sign in to comment.