diff --git a/frontend/src/components/Courses/CourseUtilComponents.tsx b/frontend/src/components/Courses/CourseUtilComponents.tsx index 2c33db07..70889c63 100644 --- a/frontend/src/components/Courses/CourseUtilComponents.tsx +++ b/frontend/src/components/Courses/CourseUtilComponents.tsx @@ -286,10 +286,10 @@ function EmptyOrNotProjects({ const deadlineDate = deadline.date; const diffTime = Math.abs(deadlineDate.getTime() - now.getTime()); const diffHours = Math.ceil(diffTime / (1000 * 60 * 60)); - const diffDays = Math.ceil(diffHours * 24); + const diffDays = Math.floor(diffHours / 24); timeLeft = - diffDays > 1 ? `${diffDays} days` : `${diffHours} hours`; + diffDays >= 1 ? `${diffDays} days` : `${diffHours} hours`; } } return (