230831 javascript Intl을 사용하여 날짜 시간 다루기 채팅방에서 채팅에 대한 각각의 시간과 일자별로 날짜를 알려주기 위해서 Intl 객체를 사용하여 사용자의 언어에 맞게 시간을 계산하여 보여줄 수 있다. 시간 보여 주기 const getTimeText = (isoDateString: string) => { const isoDate = new Date(isoDateString); const options: Intl.DateTimeFormatOptions = { hour: 'numeric', minute: 'numeric' }; return new Intl.DateTimeFormat(navigator.language, options).format(isoDate); }; getTimeText(..