From b55dcc1a45252abd010af5ade57c3a8e145ce170 Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Wed, 9 Apr 2025 00:24:08 +0200 Subject: [PATCH] bugfixing format date --- src/lib/components/Options/ContractLookup.svelte | 3 ++- src/routes/options-calculator/+page.svelte | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/components/Options/ContractLookup.svelte b/src/lib/components/Options/ContractLookup.svelte index 5ea9cf86..2d7608ea 100644 --- a/src/lib/components/Options/ContractLookup.svelte +++ b/src/lib/components/Options/ContractLookup.svelte @@ -75,12 +75,13 @@ setDefault(); } - const formatDate = (dateString) => { + const formatDate = (dateString: string) => { const date = new Date(dateString); return date.toLocaleDateString("en-US", { month: "short", day: "2-digit", year: "numeric", + timeZone: "America/New_York", }); }; diff --git a/src/routes/options-calculator/+page.svelte b/src/routes/options-calculator/+page.svelte index cff90fe1..9c0a16c3 100644 --- a/src/routes/options-calculator/+page.svelte +++ b/src/routes/options-calculator/+page.svelte @@ -537,6 +537,7 @@ month: "short", day: "2-digit", year: "numeric", + timeZone: "America/New_York", }); };