820 B
820 B
<%* // temporal: gives this note a date, deadline, reminder or time range. const componentName = "temporal"; const today = tp.date.now("YYYY-MM-DD"); const file = tp.file.find_tfile(tp.file.path(true));
setTimeout(async () => { await tp.app.fileManager.processFrontMatter(file, (frontmatter) => { const components = Array.isArray(frontmatter["components"]) ? frontmatter["components"] : []; if (!components.includes(componentName)) components.push(componentName);
frontmatter["components"] = components;
frontmatter["time_at"] = frontmatter["time_at"] ?? today;
frontmatter["time_timezone"] = frontmatter["time_timezone"] ?? "Europe/Berlin";
frontmatter["time_recurrence"] = frontmatter["time_recurrence"] ?? "";
frontmatter["time_precision"] = frontmatter["time_precision"] ?? "date";
});
}, 300) -%>