1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-11-24 08:12:24 +02:00

Chore: Fix CI (#10646)

This commit is contained in:
Henry Heino 2024-06-21 01:37:25 -07:00 committed by GitHub
parent 8eda8d3c84
commit 5db88995c0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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'),
@ -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);
};