Skip to content

Instantly share code, notes, and snippets.

@b00gizm
Last active December 27, 2024 17:42
Show Gist options
  • Save b00gizm/bf17e5b2da9de7827c23cf61c7c28ccf to your computer and use it in GitHub Desktop.
Save b00gizm/bf17e5b2da9de7827c23cf61c7c28ccf to your computer and use it in GitHub Desktop.
Notion Formula: Find next date for recurring entities such as tasks.
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