Created
October 15, 2020 01:58
-
-
Save dongsik-yoo/e9dcf83d7f4778fa48be3d8e05161b8c to your computer and use it in GitHub Desktop.
Intl.DateTimeFormat example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const date = new Date(Date.UTC(2012, 11, 20, 3, 0, 0)); | |
const options = { | |
timeZone: 'America/Los_Angeles', | |
timeStyle: 'long' | |
}; | |
console.log(new Intl.DateTimeFormat('ko-KR', options).format(date)); | |
// 오후 7시 0분 0초 GMT-8 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment