We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c1f7448 commit 4259568Copy full SHA for 4259568
application/src/main/java/org/togetherjava/tjbot/features/cakeday/CakeDayService.java
@@ -294,8 +294,9 @@ protected boolean isUserCached(User user) {
294
protected boolean hasMemberCakeDayToday(Member member) {
295
OffsetDateTime now = OffsetDateTime.now();
296
OffsetDateTime joinMonthDate = member.getTimeJoined();
297
+ int anniversary = now.getYear() - joinMonthDate.getYear();
298
- return now.getMonth() == joinMonthDate.getMonth()
299
+ return anniversary > 0 && now.getMonth() == joinMonthDate.getMonth()
300
&& now.getDayOfMonth() == joinMonthDate.getDayOfMonth();
301
}
302
0 commit comments