Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ public TotalCommitResponseDto getTotalCommits(@AuthenticationPrincipal CustomOAu
public TotalCommitResponseDto getSpringSeasonCommits(@AuthenticationPrincipal CustomOAuth2User oAuth2User) {
String username = oAuth2User.getName();
int currentYear = LocalDateTime.now().getYear(); // 올해 대입
LocalDateTime since = LocalDateTime.of(2025, 3, 1, 0, 0);
LocalDateTime until = LocalDateTime.of(2025, 5, 31, 23, 59, 59);
LocalDateTime since = LocalDateTime.of(currentYear, 3, 1, 0, 0);
LocalDateTime until = LocalDateTime.of(currentYear, 5, 31, 23, 59, 59);
return totalCommitService.getSeasonCommits(username, since, until);
}

Expand All @@ -54,8 +54,8 @@ public TotalCommitResponseDto getSpringSeasonCommits(@AuthenticationPrincipal Cu
public TotalCommitResponseDto getSummerSeasonCommits(@AuthenticationPrincipal CustomOAuth2User oAuth2User) {
String username = oAuth2User.getName();
int currentYear = LocalDateTime.now().getYear(); // 현재는 테스트용으로 2024 대입
LocalDateTime since = LocalDateTime.of(2024, 6, 1, 0, 0);
LocalDateTime until = LocalDateTime.of(2024, 8, 31, 23, 59, 59);
LocalDateTime since = LocalDateTime.of(currentYear, 6, 1, 0, 0);
LocalDateTime until = LocalDateTime.of(currentYear, 8, 31, 23, 59, 59);
return totalCommitService.getSeasonCommits(username, since, until);
}

Expand All @@ -64,8 +64,8 @@ public TotalCommitResponseDto getSummerSeasonCommits(@AuthenticationPrincipal Cu
public TotalCommitResponseDto getFallSeasonCommits(@AuthenticationPrincipal CustomOAuth2User oAuth2User) {
String username = oAuth2User.getName();
int currentYear = LocalDateTime.now().getYear(); // 현재는 테스트용으로 2024 대입
LocalDateTime since = LocalDateTime.of(2024, 9, 1, 0, 0);
LocalDateTime until = LocalDateTime.of(2024, 11, 30, 23, 59, 59);
LocalDateTime since = LocalDateTime.of(currentYear, 9, 1, 0, 0);
LocalDateTime until = LocalDateTime.of(currentYear, 11, 30, 23, 59, 59);
return totalCommitService.getSeasonCommits(username, since, until);
}

Expand All @@ -74,8 +74,8 @@ public TotalCommitResponseDto getFallSeasonCommits(@AuthenticationPrincipal Cust
public TotalCommitResponseDto getWinterSeasonCommits(@AuthenticationPrincipal CustomOAuth2User oAuth2User) {
String username = oAuth2User.getName();
int currentYear = LocalDateTime.now().getYear(); // 2024.12 ~ 2025.2 대입
LocalDateTime since = LocalDateTime.of(2025 - 1, 12, 1, 0, 0);
LocalDateTime until = LocalDateTime.of(2025, 2, 1, 23, 59, 59)
LocalDateTime since = LocalDateTime.of(currentYear - 1, 12, 1, 0, 0);
LocalDateTime until = LocalDateTime.of(currentYear, 2, 1, 23, 59, 59)
.with(TemporalAdjusters.lastDayOfMonth());
return totalCommitService.getSeasonCommits(username, since, until);
}
Expand Down