<%* var fileDate = moment(tp.file.title); // moment dates are mutable let prevDay = moment(fileDate).subtract(1, 'd').format('YYYY-MM-DD'); let nextDay = moment(fileDate).add(1, 'd').format('YYYY-MM-DD'); let prevDayWeek = moment(fileDate).subtract(1, 'd').format('gggg-[W]ww'); let nextDayWeek = moment(fileDate).add(1, 'd').format('gggg-[W]ww'); let yearLink = fileDate.format('YYYY'); let quarterLink = fileDate.format('YYYY [Q]Q'); let monthLink = fileDate.format('YYYY-MM');
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Test | |
{ | |
public static void main(String[] args) | |
{ | |
int[] example = {1, 2, 3, 4, 5, 6, 7, 8, 9}; | |
for (int i = 0; i < 10; i++) | |
{ | |
for (int current : example) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FileUtilities { | |
async getFileContents(app, path) { | |
let fileContents = await app.vault.adapter.read(path); | |
return fileContents; | |
} | |
async writeFile(app, path, newContents) { | |
return await app.vault.adapter.write(path, newContents); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 1: verify that the file exists and that task is present | |
* 2: convert the task to a taskobject and open modal | |
* 3: Modal contains | |
* a: edit tags | |
* b: edit text | |
* c: edit priority | |
* 4: Update file with new task content | |
*/ | |
async function editTask(params) { |
Copy Calendar to Obsidian Daily Note
I launch this via Obsidian Shortcut Launcher triggered by a button in my daily note template. It adds a list of my calendar events to my daily note, formatted so that I can click on them to create a new note under that name.