Uses multiple or
operators to compare formatted dates, and checks a box if any are true.
<aside>
⚠️ Change lowercase w
to uppercase W
if your weeks start on Monday.
</aside>
formatDate(now(), "wY") == formatDate(prop("Date"), "wY") or (format(toNumber(formatDate(now(), "w")) - 1) + formatDate(prop("Date"), "Y") == formatDate(prop("Date"), "wY") or format(toNumber(formatDate(now(), "w")) + 1) + formatDate(prop("Date"), "Y") == formatDate(prop("Date"), "wY"))
formatDate(now(), "wY") == formatDate(prop("Date"), "wY")
The current date's wY
format matches the Date
property's wY
format.
format(toNumber(formatDate(now(), "w")) - 1) + formatDate(prop("Date"), "Y") == formatDate(prop("Date"), "wY")
The current date's wY
format minus 1 week (last week) matches the Date
property's wY
format.
format(toNumber(formatDate(now(), "w")) + 1) + formatDate(prop("Date"), "Y") == formatDate(prop("Date"), "wY")
The current date's wY
format plus 1 week (next week) matches the Date
property's wY
format.
<aside>
⚠️ Change lowercase w
to uppercase W
if your weeks start on Monday.
</aside>
formatDate(prop("Date"), "W")
format(toNumber(formatDate(now(), "W")) - 1) + formatDate(prop("Date"), "Y") == formatDate(prop("Date"), "WY")
formatDate(now(), "wY") == formatDate(prop("Date"), "wY")
format(toNumber(formatDate(now(), "W")) + 1) + formatDate(prop("Date"), "Y") == formatDate(prop("Date"), "WY")
<aside> <img src="https://s3-us-west-2.amazonaws.com/secure.notion-static.com/1649d2f9-1b45-478a-86b4-341fbe27e06f/benny.png" alt="https://s3-us-west-2.amazonaws.com/secure.notion-static.com/1649d2f9-1b45-478a-86b4-341fbe27e06f/benny.png" width="40px" /> By Ben • Latest • Was this helpful? Please consider buying me a coffee. Cheers!
</aside>