
I’ve been using this super helpful formula to show a gallery of tasks that have a Date
field that’s within the current week without ever caring how the formula actually works:
and(toNumber(formatDate(prop("Date"), "WW")) == toNumber(formatDate(now(), "WW")), year(prop("Date")) == year(now()))
That is until today when I wanted to show stuff coming up within the next week. Turns out, we just need to add 7 days to the current week, against which we compare our Date
field. Voilà, the Is next week?
formula:
and(toNumber(formatDate(prop("Date"), "WW")) == toNumber(formatDate(dateAdd(now(), 7, "days"), "WW")), year(prop("Date")) == year(now()))
One Comment
First time here, haha