try year filter again

This commit is contained in:
Adora Laura Kalb 2023-06-04 20:27:58 +02:00
parent 5ea2dbf283
commit 1ef52d30f1
Signed by: adoralaura
GPG key ID: 7A4552166FC8C056
2 changed files with 4 additions and 3 deletions

View file

@ -1,3 +1,4 @@
const now = DateTime.now();
const { DateTime } = require("luxon");
module.exports = function(eleventyConfig) {
@ -10,8 +11,8 @@ module.exports = function(eleventyConfig) {
return DateTime.fromJSDate(value).toLocaleString(DateTime.DATETIME_FULL)
});
eleventyConfig.addFilter("copyrightyear", function(value) {
return DateTime.fromJSDate(value).toLocaleString({ year: 'numeric'})
eleventyConfig.addFilter("copyrightyear", function() {
return DateTime.local().toFormat('y')
});
return {

View file

@ -105,6 +105,6 @@ date: Last Modified
in the effort to make the web quick and usable again :)
<br/><br/>This page was last updated at {{ page.date | timestamp }}
<br/>
Copyright Laura Kalb {{ date | copyrightyear }}
Copyright Laura Kalb {{ copyrightyear }}
<br/><br/><a href="/impressum.html">Impressum und Datenschutzerklärung</a>
</p>