Hi, Hello! My name is Sarah - the writer behind redgregory.com.
Calendar Formulas
As I curated a list of really cool date formulas for my blog, I stopped and thought about how much Notion can really do. Wondering what to do in Notion, how to approach the program, what pages to create and for what purpose? There are practically an infinite amount. In fact, I've spent the year creating 283 use-cases. And I'm only scratching the surface. With the addition of API (coming Spring 2021 ... very soon!), the possibilities may truly be endless.
Date formulas I've used in bigger formulas that may be useful for your next build.
highlight weekly progress:
slice("◻️◻️◻️◻️◻️◻️◻️", 0, day(prop("Date")) * 2) + "🔲" + slice("◼️◼️◼️◼️◼️◼️◼️", 1, 14 - day(prop("Date")) * 2)
return week of the month:
ceil((date(prop("Date")) + day(dateSubtract(prop("Date"), date(prop("Date")) - 1, "days"))) / 7)
return first day of the month:
dateSubtract(prop("Date"), date(prop("Date")) - 1, "days")
return last day of the month:
dateSubtract(dateAdd(dateSubtract(prop("Date"), date(prop("Date")) - 1, "days"), 1, "months"), 1, "days")
How many days does the month have?:
date(dateSubtract(dateAdd(dateSubtract(prop("Date"), date(prop("Date")) - 1, "days"), 1, "months"), 1, "days"))
How many weeks does the month have?:
ceil((date(dateSubtract(dateAdd(dateSubtract(prop("Date"), date(prop("Date")) - 1, "days"), 1, "months"), 1, "days")) + day(dateSubtract(dateSubtract(dateAdd(dateSubtract(prop("Date"), date(prop("Date")) - 1, "days"), 1, "months"), 1, "days"), date(dateSubtract(dateAdd(dateSubtract(prop("Date"), date(prop("Date")) - 1, "days"), 1, "months"), 1, "days")) - 1, "days"))) / 7)