From 216e8fe36bd2dc9d09c69eff0431e6962933dedd Mon Sep 17 00:00:00 2001 From: Henry Heino Date: Thu, 20 Jun 2024 11:05:12 -0700 Subject: [PATCH] Fix CI --- packages/utils/time.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/utils/time.ts b/packages/utils/time.ts index 59bd8bb564d..ade8857f91e 100644 --- a/packages/utils/time.ts +++ b/packages/utils/time.ts @@ -3,8 +3,8 @@ // added here, and should be based on dayjs (not moment) // ----------------------------------------------------------------------------------------------- -import dayjs = require('dayjs'); -import dayJsRelativeTime = require('dayjs/plugin/relativeTime'); +import * as dayjs from 'dayjs'; +import * as dayJsRelativeTime from 'dayjs/plugin/relativeTime'; const supportedLocales: Record = { 'ar': require('dayjs/locale/ar'), @@ -96,7 +96,7 @@ export const formatMsToRelative = (ms: number) => { // The expected pattern for invalid date formatting in JS is to return the string "Invalid // Date", so we do that here. If we don't, dayjs will process the invalid date and return "a // month ago", somehow... - if (!d.isValid()) return 'Invalid Date'; + if (!d.isValid()) return 'Invalid date'; return d.fromNow(false); };