Skip to content

Instantly share code, notes, and snippets.

@motionharvest
Last active July 1, 2021 22:49
Show Gist options
  • Save motionharvest/a70eb61a98d9ef224476a74deab3060d to your computer and use it in GitHub Desktop.
Save motionharvest/a70eb61a98d9ef224476a74deab3060d to your computer and use it in GitHub Desktop.
Days Until Formula for Notion
empty(prop("Due Date")) ? "" : ((dateBetween(prop("Due Date"), now(), "hours") < 0) ? ((dateBetween(prop("Due Date"), now(), "hours") > -24) ? "Today" : ((abs(floor(dateBetween(prop("Due Date"), now(), "hours") / 24) + 1) == 1) ? "Yesterday" : (format(abs(floor(dateBetween(prop("Due Date"), now(), "hours") / 24) + 1)) + " Days ago"))) : ((dateBetween(prop("Due Date"), now(), "hours") < 24) ? "Tomorrow" : (format(abs(floor(dateBetween(prop("Due Date"), now(), "hours") / 24) + 1)) + " Days from now")))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment