Javascript 시간 더하기
function addMinutesToCurrentTime(minutesToAdd) { const now = new Date(); // Get the current date and time now.setMinutes(now.getMinutes() + minutesToAdd); // Add 15 minutes return now;}// Example usageconst updatedTime = addMinutesToCurrentTime(15);console.log(updatedTime.toLocaleTimeString('en-US', { hour12: false })); // Example output: "15:30:00" (24-hour format)
2024.12.05