Add nextWeek template variable (#109)

This commit is contained in:
Ben Schumacher
2022-11-03 13:14:43 +01:00
committed by GitHub
parent bb6bf289d9
commit 334550675a
2 changed files with 6 additions and 0 deletions
+5
View File
@@ -105,6 +105,11 @@ export function replaceTemplateVars(s: string, pageName: string): string {
lastWeek.setDate(lastWeek.getDate() - 7);
return niceDate(lastWeek);
}
case "nextWeek": {
const nextWeek = new Date();
nextWeek.setDate(nextWeek.getDate() + 7);
return niceDate(nextWeek);
}
case "page":
return pageName;
}