@@ -44,8 +44,8 @@ public TotalCommitResponseDto getTotalCommits(@AuthenticationPrincipal CustomOAu
4444 public TotalCommitResponseDto getSpringSeasonCommits (@ AuthenticationPrincipal CustomOAuth2User oAuth2User ) {
4545 String username = oAuth2User .getName ();
4646 int currentYear = LocalDateTime .now ().getYear (); // 올해 대입
47- LocalDateTime since = LocalDateTime .of (2025 , 3 , 1 , 0 , 0 );
48- LocalDateTime until = LocalDateTime .of (2025 , 5 , 31 , 23 , 59 , 59 );
47+ LocalDateTime since = LocalDateTime .of (currentYear , 3 , 1 , 0 , 0 );
48+ LocalDateTime until = LocalDateTime .of (currentYear , 5 , 31 , 23 , 59 , 59 );
4949 return totalCommitService .getSeasonCommits (username , since , until );
5050 }
5151
@@ -54,8 +54,8 @@ public TotalCommitResponseDto getSpringSeasonCommits(@AuthenticationPrincipal Cu
5454 public TotalCommitResponseDto getSummerSeasonCommits (@ AuthenticationPrincipal CustomOAuth2User oAuth2User ) {
5555 String username = oAuth2User .getName ();
5656 int currentYear = LocalDateTime .now ().getYear (); // 현재는 테스트용으로 2024 대입
57- LocalDateTime since = LocalDateTime .of (2024 , 6 , 1 , 0 , 0 );
58- LocalDateTime until = LocalDateTime .of (2024 , 8 , 31 , 23 , 59 , 59 );
57+ LocalDateTime since = LocalDateTime .of (currentYear , 6 , 1 , 0 , 0 );
58+ LocalDateTime until = LocalDateTime .of (currentYear , 8 , 31 , 23 , 59 , 59 );
5959 return totalCommitService .getSeasonCommits (username , since , until );
6060 }
6161
@@ -64,8 +64,8 @@ public TotalCommitResponseDto getSummerSeasonCommits(@AuthenticationPrincipal Cu
6464 public TotalCommitResponseDto getFallSeasonCommits (@ AuthenticationPrincipal CustomOAuth2User oAuth2User ) {
6565 String username = oAuth2User .getName ();
6666 int currentYear = LocalDateTime .now ().getYear (); // 현재는 테스트용으로 2024 대입
67- LocalDateTime since = LocalDateTime .of (2024 , 9 , 1 , 0 , 0 );
68- LocalDateTime until = LocalDateTime .of (2024 , 11 , 30 , 23 , 59 , 59 );
67+ LocalDateTime since = LocalDateTime .of (currentYear , 9 , 1 , 0 , 0 );
68+ LocalDateTime until = LocalDateTime .of (currentYear , 11 , 30 , 23 , 59 , 59 );
6969 return totalCommitService .getSeasonCommits (username , since , until );
7070 }
7171
@@ -74,8 +74,8 @@ public TotalCommitResponseDto getFallSeasonCommits(@AuthenticationPrincipal Cust
7474 public TotalCommitResponseDto getWinterSeasonCommits (@ AuthenticationPrincipal CustomOAuth2User oAuth2User ) {
7575 String username = oAuth2User .getName ();
7676 int currentYear = LocalDateTime .now ().getYear (); // 2024.12 ~ 2025.2 대입
77- LocalDateTime since = LocalDateTime .of (2025 - 1 , 12 , 1 , 0 , 0 );
78- LocalDateTime until = LocalDateTime .of (2025 , 2 , 28 , 23 , 59 , 59 )
77+ LocalDateTime since = LocalDateTime .of (currentYear - 1 , 12 , 1 , 0 , 0 );
78+ LocalDateTime until = LocalDateTime .of (currentYear , 2 , 1 , 23 , 59 , 59 )
7979 .with (TemporalAdjusters .lastDayOfMonth ());
8080 return totalCommitService .getSeasonCommits (username , since , until );
8181 }
0 commit comments