상대적인시간1 timeago() 상대적인 시간 표현해주는 함수 https://zetawiki.com/wiki/%ED%95%A8%EC%88%98_timeago() 함수 timeago() - 제타위키 다음 문자열 포함... zetawiki.com function timeago(date) { var t = new Date(date); var seconds = Math.floor((new Date() - t.getTime()) / 1000); if (seconds > 86400) return t.toISOString().substring(0, 10); if (seconds > 3600) return Math.floor(seconds / 3600) + "시간 전"; if (seconds > 60) return Math.floor(seconds / 60) + "분 전"; re.. Front/javascript 2023. 6. 17. 이전 1 다음