Last active
December 27, 2024 17:42
-
-
Save b00gizm/bf17e5b2da9de7827c23cf61c7c28ccf to your computer and use it in GitHub Desktop.
Notion Formula: Find next date for recurring entities such as tasks.
This file contains hidden or 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
ifs( | |
prop("Recurrence") == "Daily", | |
dateAdd( | |
if( | |
now() > prop("Due Date"), | |
now(), | |
prop("Due Date") | |
), | |
1, | |
"days" | |
), | |
prop("Recurrence") == "Weekly", | |
dateAdd( | |
prop("Due Date"), | |
if( | |
now() <= prop("Due Date"), | |
1, | |
dateBetween(now(), prop("Due Date"), "weeks") + 1 | |
), | |
"weeks" | |
), | |
prop("Recurrence") == "Monthly", | |
dateAdd( | |
prop("Due Date"), | |
if( | |
now() <= prop("Due Date"), | |
1, | |
dateBetween(now(), prop("Due Date"), "months") + 1 | |
), | |
"months" | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment