Skip to content

Commit

Permalink
fix: 지각 처리 버그 수정 (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
ddingmin authored May 25, 2024
1 parent 89e7cae commit 8d00e23
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ data class Attendance(

fun isTardy() = attendanceStatus.isTardy()

private fun LocalDateTime.isAvailableCheckInTime(sessionStartTime: LocalDateTime): Boolean {
private fun LocalDateTime.isAvailableCheckInTime(attendanceTime: LocalDateTime): Boolean {
// 출석 요청 가능 시간은 세션 시작 시간의 30분 전부터 120분 후까지 입니다. (정책에 따라 수정 필요)
if (this.isBefore(sessionStartTime.minusMinutes(15))) {
if (attendanceTime.isBefore(this.minusMinutes(15))) {
throw AttendanceBeforeTimeException()
}
if (this.isAfter(sessionStartTime.plusMinutes(240))) {
if (attendanceTime.isAfter(this.plusMinutes(120))) {
throw AttendanceAfterTimeException()
}
return true
Expand Down

0 comments on commit 8d00e23

Please sign in to comment.