From 378428569525101c8b0db6da0966cec98282924c Mon Sep 17 00:00:00 2001 From: Brandon Presley Date: Fri, 28 Oct 2022 19:04:05 +1300 Subject: [PATCH] Fix short day format --- time.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/time.ts b/time.ts index 48b1b0e..8bbec8b 100644 --- a/time.ts +++ b/time.ts @@ -24,7 +24,7 @@ function twelveHour(twentyFourHour: string) { function dayOfWeek(iso: string) { const date = new Date(iso); const day = date.getDay(); - const target = DAYS[day === 0 ? 0 : day - 1]; + const target = DAYS[day]; return target.slice(0, 3); }