공부/JavaScript

자바스크립트 날짜 포맷 Intl.DateTimeFormat

bumcrush 2022. 11. 28. 18:45
반응형
자바스크립트 날짜 포맷 Intl.DateTimeFormat

 

new Intl.DateTimeFormat("ko", { dateStyle: 'full' }).format(new Date())
// '2022년 11월 28일 월요일'


new Intl.DateTimeFormat("ko", { dateStyle: 'full' , timeStyle: 'medium'}).format(new Date())
//'2022년 11월 28일 월요일 오후 6:42:50'

 

 

*참고 자료

https://www.daleseo.com/js-intl-api/

 

자바스크립트의 Intl API

Engineering Blog by Dale Seo

www.daleseo.com

 

https://youtu.be/4YnKQrPMTNU

 

반응형