Created
October 11, 2023 11:56
-
-
Save rurumimic/9fd4f4769282b7125563e5a919cadd34 to your computer and use it in GitHub Desktop.
javascript datetime
This file contains 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
new Date().toUTCString() | |
new Date().toGMTString() | |
// 'Wed, 11 Oct 2023 11:54:48 GMT' | |
new Date().toLocaleString('ko-KR', {timeZone: 'Asia/Seoul', hour12: false, dateStyle: 'full', timeStyle: 'long'}) | |
// '2023. 10. 11. 수요일 20시 47분 27초 GMT+9' | |
new Date().toLocaleString('en-US', {timeZone: 'America/New_York', hour12: false, dateStyle: 'full', timeStyle: 'long'}) | |
// 'Wednesday, October 11, 2023 at 07:48:56 EDT' | |
new Date().toLocaleString('en-GB', {timeZone: 'Europe/London', hour12: false, dateStyle: 'full', timeStyle: 'long'}) | |
// 'Wednesday, 11 October 2023 at 12:54:19 BST' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment