Compare commits

..
2 Commits
Author SHA1 Message Date
inherentlee f68cd37b08 filters 2026-10-18 11:10:35 -07:00
inherentlee 9e64deb336 Update content through Mattrbld 2026-09-27 13:53:31 -07:00
3 changed files with 7 additions and 7 deletions

No files matched your search

+1 -1
View File
@@ -140,7 +140,7 @@
"options": {
"removable": true,
"allowUpload": true,
"root": "/src/ics",
"root": "/ics",
"filetypes": [
"ics"
]
+6 -6
View File
@@ -18,12 +18,6 @@ export default function (eleventyConfig) {
return collection.slice(0, n);
});
/* Check if a dateTime happened before the current dateTime */
eleventyConfig.addFilter("inThePast", (dateString) => {
if (DateTime.fromISO(dateString) < DateTime.now()) return true;
return false;
});
/* Check if dates occurred on the same day */
eleventyConfig.addFilter("dateStringsEqual", (dateString1, dateString2) => {
const date1 = DateTime.fromISO(dateString1);
@@ -39,6 +33,12 @@ export default function (eleventyConfig) {
return DateTime.fromISO(dateString, { zone: zone || "utc" }).toFormat("yyyy-LL-dd");
});
/* Check if a dateTime happened before the current dateTime */
eleventyConfig.addFilter("inThePast", (dateString) => {
if (DateTime.fromISO(dateString) < DateTime.now()) return true;
return false;
});
/* What it says on the tin */
eleventyConfig.addFilter("randomize", function (array) {
// Create a copy of the array to avoid modifying the original
View File
Whitespace-only changes.