mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-01 20:52:27 +08:00
Format date and time
This commit is contained in:
parent
75941de449
commit
970c3bd7ad
@ -98,10 +98,15 @@ export default class BackupOptions extends OptionsWidget {
|
||||
backupFiles = [{filePath: t('backup.no_backup_yet'), mtime: ''}];
|
||||
}
|
||||
|
||||
const dateTimeFormatter = new Intl.DateTimeFormat(navigator.language, {
|
||||
dateStyle: "medium",
|
||||
timeStyle: "medium"
|
||||
});
|
||||
|
||||
for (const {filePath, mtime} of backupFiles) {
|
||||
this.$existingBackupList.append($(`
|
||||
<tr>
|
||||
<td>${(mtime) ? mtime : "-"}</td>
|
||||
<td>${(mtime) ? dateTimeFormatter.format(new Date(mtime)) : "-"}</td>
|
||||
<td>${filePath}</td>
|
||||
</tr>
|
||||
`));
|
||||
|
Loading…
x
Reference in New Issue
Block a user