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
lets( | |
/* number of day of week, 0-6 (starting with sunday as 0) */ | |
no, prop("Date").formatDate("d").toNumber(), | |
/* day name */ | |
day, prop("Date").formatDate("dddd"), | |
/* save the colors we want for each day */ | |
color, ifs( | |
no == 1, "blue", /* mon */ |
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
prop("Name").test("Journal: \w{3} \d{1,2}, \d{4}") |
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
lets( | |
/* Find all unfinished tasks */ | |
tasks, prop("Tasks").filter(current.prop("Status") != "Done"), | |
/* Find all the people assigned to those tasks */ | |
people, | |
tasks | |
.map(current.prop("Assignee")) | |
/** | |
* Because Assignee is a Person property, it's a list, |
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
lets( | |
/* Store unfinished actions */ | |
actions, prop("Actions").filter(!["Done", "Archive"].includes(current.prop("Status"))), | |
/* Sort by timestamp of task and store with id */ | |
actionId, | |
actions | |
.map(formatDate(current.prop("Date"), "X") + "-" + current.id()) | |
.sort() | |
.first() |
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
lets( | |
values, prop("Agenda(s)").map(current.prop("Journal Entries").map(current.prop("Readiness"))).flat().sort(), | |
mid, (values.length() / 2).floor(), | |
value, values.length() % 2 == 0 ? (values.at(mid) + values.at(mid - 1)) / 2 : values.at(mid), | |
value | |
) |
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
lets( | |
values, prop("Values").map(current.prop("Value")).filter(!current.empty() || current == 0), | |
values.sum() / values.length() | |
) |
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
lets( | |
nowVal, now(), | |
/* We need now as just a date with no time */ | |
nowDate, nowVal.formatDate("YYYY-MM-DD").parseDate(), | |
dueDate, prop("Due Date").formatDate("YYYY-MM-DD").parseDate(), | |
/* Days between now and the due date */ | |
days, dateBetween(dueDate, nowDate, "days"), |
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
lets( | |
/* Store unfinished actions */ | |
actions, prop("Actions").filter(current.prop("Status") != "Done"), | |
/* Sort by timestamp of task and store with id */ | |
actionId, | |
actions | |
.map(formatDate(current.prop("Date"), "X") + "-" + current.id()) | |
.sort() | |
.first() |
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
lets( | |
/* Store unfinished tasks */ | |
tasks, prop("Tasks").filter(current.prop("Status") != "Done"), | |
/* Sort by timestamp of task and store with id */ | |
task, | |
tasks | |
.map(formatDate(current.prop("Date"), "X") + "-" + current.id()) | |
.sort() | |
.first(), |
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
prop("Videos") | |
.map(current.prop("Views")) | |
.sort() | |
.reverse() | |
.map( | |
lets( | |
views, | |
current, | |
prop("Videos").find(current.prop("Views") == views) | |
) |
NewerOlder