Skip to content

Instantly share code, notes, and snippets.

@dongsik-yoo
Created October 15, 2020 01:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dongsik-yoo/e9dcf83d7f4778fa48be3d8e05161b8c to your computer and use it in GitHub Desktop.
Save dongsik-yoo/e9dcf83d7f4778fa48be3d8e05161b8c to your computer and use it in GitHub Desktop.
Intl.DateTimeFormat example
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