From 179d51d4082bd919f0dce5d521ba47e6fb46052a Mon Sep 17 00:00:00 2001 From: developomp Date: Sun, 30 Jul 2023 21:16:50 +0900 Subject: [PATCH] test: attempt to fix failing tests --- apps/main/src/utils/getAge.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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 *