Javascript 현재 시간을 15단위로 표시하기
function getCurrentTimeRoundedTo15Minutes() { const now = new Date(); // Get the current hour and minute const hours = now.getHours(); const minutes = now.getMinutes(); // Round minutes to the nearest 15-minute increment const roundedMinutes = Math.round(minutes / 15) * 15; // Handle overflow of minutes (e.g., 60 minutes = next hour) const adjustedHours = (roundedMinutes ..
2024.12.05