function daily_note_tasks_query_builder(tp) { // 1. Parse the file title using the custom format YYYY.MM.DD.dd const date = moment(tp.file.title, "YYYY.MM.DD.dd").format("YYYY-MM-DD"); // 2. Construct the full query string using the static date const query = ` ((not done) OR (done on ${date})) (((has start date) AND (starts on or before ${date})) OR (scheduled on or before ${date}) OR (due on or before ${date})) short mode `; // 3. Wrap the query in the necessary ```tasks block and return it return "```tasks" + query + "```"; } module.exports = daily_note_tasks_query_builder;