1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-15 23:00:36 +02:00

Applied prettier to code base

This commit is contained in:
Laurent Cozic
2018-03-09 17:49:35 +00:00
parent e868102c98
commit c4f19465a6
203 changed files with 13395 additions and 7927 deletions

View File

@ -1,10 +1,9 @@
const moment = require('moment');
const moment = require("moment");
class Time {
constructor() {
this.dateFormat_ = 'DD/MM/YYYY';
this.timeFormat_ = 'HH:mm';
this.dateFormat_ = "DD/MM/YYYY";
this.timeFormat_ = "HH:mm";
}
dateFormat() {
@ -24,7 +23,7 @@ class Time {
}
dateTimeFormat() {
return this.dateFormat() + ' ' + this.timeFormat();
return this.dateFormat() + " " + this.timeFormat();
}
unix() {
@ -44,15 +43,25 @@ class Time {
}
unixMsToIso(ms) {
return moment.unix(ms / 1000).utc().format('YYYY-MM-DDTHH:mm:ss.SSS') + 'Z';
return (
moment
.unix(ms / 1000)
.utc()
.format("YYYY-MM-DDTHH:mm:ss.SSS") + "Z"
);
}
unixMsToIsoSec(ms) {
return moment.unix(ms / 1000).utc().format('YYYY-MM-DDTHH:mm:ss') + 'Z';
return (
moment
.unix(ms / 1000)
.utc()
.format("YYYY-MM-DDTHH:mm:ss") + "Z"
);
}
unixMsToLocalDateTime(ms) {
return moment.unix(ms / 1000).format('DD/MM/YYYY HH:mm');
return moment.unix(ms / 1000).format("DD/MM/YYYY HH:mm");
}
formatMsToLocal(ms, format = null) {
@ -71,9 +80,8 @@ class Time {
sleep(seconds) {
return this.msleep(seconds * 1000);
}
}
const time = new Time();
module.exports = { time };
module.exports = { time };