diff --git a/apps/main/src/utils/getAge.ts b/apps/main/src/utils/getAge.ts index 74fccfe..2eb84b8 100644 --- a/apps/main/src/utils/getAge.ts +++ b/apps/main/src/utils/getAge.ts @@ -1,6 +1,3 @@ -// my birthday in KST :D -const birth = new Date("2002-07-30, 00:00:00.000 +09:00") - const dateFormatOption: Intl.DateTimeFormatOptions = { timeZone: "Asia/Seoul", timeZoneName: "longOffset", @@ -14,6 +11,14 @@ const dateFormatOption: Intl.DateTimeFormatOptions = { fractionalSecondDigits: 3, } +// my birthday in KST :D +const birth = new Date( + new Date("2002-07-30, 00:00:00.000 +09:00").toLocaleString( + "en-US", + dateFormatOption + ) +) + /** * Gets developomp's age with decimal precision *