I just pushed an update to the /date
endpoint on the Lab environment to provide a week number (w
) and ISO week number (W
) as part of the response.
The idea being that you could run the rule every Wed/Thursday and then have it check to see if it’s currently an even week. The way we do this is to retrieve the current week number from the /date
endpoint and then pass it to a simple formula via the /math
endpoint (where we determine it’s an even week if it’s perfectly divisible by two):
(We’d like to build math and date as first-class features within the Rule Engine, but hopefully this covers your need for now!)