mirror of
https://codeberg.org/lauralani/www-lauka-net.git
synced 2024-11-23 20:50:40 +01:00
try year filter again
This commit is contained in:
parent
5ea2dbf283
commit
1ef52d30f1
2 changed files with 4 additions and 3 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
const now = DateTime.now();
|
||||||
const { DateTime } = require("luxon");
|
const { DateTime } = require("luxon");
|
||||||
|
|
||||||
module.exports = function(eleventyConfig) {
|
module.exports = function(eleventyConfig) {
|
||||||
|
@ -10,8 +11,8 @@ module.exports = function(eleventyConfig) {
|
||||||
return DateTime.fromJSDate(value).toLocaleString(DateTime.DATETIME_FULL)
|
return DateTime.fromJSDate(value).toLocaleString(DateTime.DATETIME_FULL)
|
||||||
});
|
});
|
||||||
|
|
||||||
eleventyConfig.addFilter("copyrightyear", function(value) {
|
eleventyConfig.addFilter("copyrightyear", function() {
|
||||||
return DateTime.fromJSDate(value).toLocaleString({ year: 'numeric'})
|
return DateTime.local().toFormat('y')
|
||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -105,6 +105,6 @@ date: Last Modified
|
||||||
in the effort to make the web quick and usable again :)
|
in the effort to make the web quick and usable again :)
|
||||||
<br/><br/>This page was last updated at {{ page.date | timestamp }}
|
<br/><br/>This page was last updated at {{ page.date | timestamp }}
|
||||||
<br/>
|
<br/>
|
||||||
Copyright Laura Kalb {{ date | copyrightyear }}
|
Copyright Laura Kalb {{ copyrightyear }}
|
||||||
<br/><br/><a href="/impressum.html">Impressum und Datenschutzerklärung</a>
|
<br/><br/><a href="/impressum.html">Impressum und Datenschutzerklärung</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
Loading…
Reference in a new issue