경과 시간 표시하기 function formatTimeAgo(timestamp) { // 현재 시간을 가져옵니다. const now = new Date(); // 입력된 timestamp를 Date 객체로 변환합니다. const createAt = new Date(timestamp); // 현재 시간과 입력된 시간의 차이를 계산합니다. const timeDiff = now - createAt; // 시간 차이를 시간 단위로 변환합니다. const hoursAgo = Math.floor(timeDiff / (1000 * 60 * 60)); // 만약 1시간 이내라면... if (hoursAgo < 1) { // 시간 차이를 분 단위로 변환합니다. const minutesAgo = Math.floor(tim..