Skip to content

Commit 07b8b0c

Browse files
committed
add: 一周中的第几天
1 parent 5bc2957 commit 07b8b0c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/math/day_of_the_week.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class Solution {
1616
days += monthDays[i];
1717
}
1818
if (((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) && month > 2) {
19-
days += day + 1;
19+
days += 1;
2020
}
2121
days += day;
2222
return week[(days + 3) % 7];

test/lib/lib_test.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// 执行编译时间:2023-12-30 13:30:33
1+
// 执行编译时间:2023-12-30 13:34:21
22
#include <gtest/gtest.h>
33
#include <lib.hpp>
44

0 commit comments

Comments
 (0)