You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-15 23:00:36 +02:00
Chore: Apply eslint rules
This commit is contained in:
@ -33,7 +33,7 @@ class Time {
|
||||
}
|
||||
|
||||
dateTimeFormat() {
|
||||
return this.dateFormat() + ' ' + this.timeFormat();
|
||||
return `${this.dateFormat()} ${this.timeFormat()}`;
|
||||
}
|
||||
|
||||
unix() {
|
||||
@ -54,19 +54,19 @@ class Time {
|
||||
|
||||
unixMsToIso(ms) {
|
||||
return (
|
||||
moment
|
||||
`${moment
|
||||
.unix(ms / 1000)
|
||||
.utc()
|
||||
.format('YYYY-MM-DDTHH:mm:ss.SSS') + 'Z'
|
||||
.format('YYYY-MM-DDTHH:mm:ss.SSS')}Z`
|
||||
);
|
||||
}
|
||||
|
||||
unixMsToIsoSec(ms) {
|
||||
return (
|
||||
moment
|
||||
`${moment
|
||||
.unix(ms / 1000)
|
||||
.utc()
|
||||
.format('YYYY-MM-DDTHH:mm:ss') + 'Z'
|
||||
.format('YYYY-MM-DDTHH:mm:ss')}Z`
|
||||
);
|
||||
}
|
||||
|
||||
@ -83,7 +83,7 @@ class Time {
|
||||
if (format === null) format = this.dateTimeFormat();
|
||||
const m = moment(localDateTime, format);
|
||||
if (m.isValid()) return m.toDate().getTime();
|
||||
throw new Error('Invalid input for formatLocalToMs: ' + localDateTime);
|
||||
throw new Error(`Invalid input for formatLocalToMs: ${localDateTime}`);
|
||||
}
|
||||
|
||||
// Mostly used as a utility function for the DateTime Electron component
|
||||
|
Reference in New Issue
Block a user