Last active
September 13, 2023 00:59
-
-
Save typeoneerror/04ca6e4962428c1b09431e00d0eb61d2 to your computer and use it in GitHub Desktop.
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(), | |
/* Explode stored id and find the task with that id */ | |
tasks | |
.find( | |
let( | |
taskId, | |
task.split("-").last(), | |
current.id() == taskId | |
) | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment