Skip to content

Commit

Permalink
refactor: yesterdayUserCount 메소드가 하루전 날짜를 기준으로 조회하도록 수정한다
Browse files Browse the repository at this point in the history
  • Loading branch information
devxb committed Jul 11, 2024
1 parent d5a63d1 commit ddcb0c5
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ class UserStatisticService(
) {

fun getYesterdayUserCount(): Int {
val current = LocalDate.now()
val startDay = current.atTime(0, 0, 0).toInstant(ZoneOffset.UTC)
val endDay = current.atTime(23, 59, 59).toInstant(ZoneOffset.UTC)
val yesterday = LocalDate.now().minusDays(1)
val startDay = yesterday.atTime(0, 0, 0).toInstant(ZoneOffset.UTC)
val endDay = yesterday.atTime(23, 59, 59).toInstant(ZoneOffset.UTC)
return userStatisticRepository.getDailyUserCount(startDay, endDay)
}

Expand Down

0 comments on commit ddcb0c5

Please sign in to comment.