Skip to content

Commit

Permalink
Chore: Fix CI (#10646)
Browse files Browse the repository at this point in the history
  • Loading branch information
personalizedrefrigerator authored Jun 21, 2024
1 parent 8eda8d3 commit 5db8899
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/utils/time.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, unknown> = {
'ar': require('dayjs/locale/ar'),
Expand Down Expand Up @@ -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);
};
Expand Down

0 comments on commit 5db8899

Please sign in to comment.