Skip to content

Commit

Permalink
fix: 시간 표기 오류 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
DWL21 committed Feb 6, 2025
1 parent ae6cac6 commit 6553364
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ data class Time(
}

fun toTimeFormat(): String {
return "${time / HOUR_TO_MIN}$TIME_DELIMITER${time % HOUR_TO_MIN}"
val hours = time / HOUR_TO_MIN
val minutes = (time % HOUR_TO_MIN).toString().padStart(2, '0')
return "$hours$TIME_DELIMITER$minutes"
}

fun isOverThan(other: Time): Boolean {
Expand Down

0 comments on commit 6553364

Please sign in to comment.