From 4b21a41b2451dfcc8aacc9736ef2e2de7a983941 Mon Sep 17 00:00:00 2001 From: Alexander Zinn Date: Thu, 30 Oct 2025 04:55:08 -0400 Subject: [PATCH] Refactor getTimezoneAbbreviation function in date utility for improved readability and efficiency. --- src/utility/date.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/utility/date.ts b/src/utility/date.ts index c87f793..3485dbf 100644 --- a/src/utility/date.ts +++ b/src/utility/date.ts @@ -46,11 +46,7 @@ export const getAdjustedTime = (): Moment => { }; export const getTimezoneAbbreviation = (date: Date): string => { - const timezone = date - .toString() - .match(/\(.+\)/g)?.[0] ?? '' - .replace('(', '') ?? '' - .replace(')', ''); + const timezone = date.toString().match(/\(.+\)/g)?.[0] ?? ''.replace('(', '') ?? ''.replace(')', ''); let abbreviation = ''; timezone.split(' ').forEach(word => {