I played a little … if you rather have a “nice” German display, and the “last changed” as days past, you could use the following DataviewJS code:
Show a TOC for this & subfolders, nice formatting
---
#dateformat: "yyyy-MM-dd HH:mm" # Luxon format
dateformat: "dd.MM.yyyy" # Luxon format
locale: de
---
# Inhaltsverzeichnis
```dataviewjs
var n = luxon.DateTime.now();
var format = dv.current().dateformat || 'yyyy-MM-dd';
var locale = dv.current().locale || 'en';
dv.table(
['Notiz', 'Angelegt', 'Letzte Änderung'],
dv.pages()
.where(p => p.file.name != dv.current().file.name
&& p.file.folder.includes(dv.current().file.folder))
.sort(p => p.file.mtime, 'desc')
.map(p => [
p.file.link,
p.file.ctime.setLocale(locale).toFormat(format),
p.file.mtime.toRelative({locale:locale,unit:'days'})])
)
```
For the “techies”: In this example I use strictly Luxon, not moment.js.
It will then look like this:
For our non-German readers
Just change the YAML to your locale and an appropriate dateformat string, like:
dateformat: "yyyy-MM-dd" # Luxon format
locale: en
and modify the header line in the dataviewjs part to use headings in your language:
```dataviewjs
…
dv.table(
['Note', 'Created', 'Last change'],
…
and it’ll look like this:
