How to show events for "This Weekend, Next Week" Stemming from this original post I was able to show Events using a custom date field and successfully got "Today" and "Tomorrow" events to show up.

How would I go about doing some custom Math to show "This Weekend" or "Next Week" events? I'm sure I have to first write a conditional on determine what the current Day is, but not sure the best way to do this.
Twigs date_modify filter accepts every string, which is supported by phps strtotime().

These strings are called Relative Formats.

.

Examples:

In the original post you used:

{% set day = date('m/d/Y') %}
{% set nextDay = day|date_modify('+1 day') %}


but with Relative Formats you can also do something like this:

{% set var = day|date_modify('now') %}
{% set var = day|date_modify('10 September 2000') %}
{% set var = day|date_modify('+1 week') %}
{% set var = day|date_modify('+1 week 2 days 4 hours 2 seconds') %}
{% set var = day|date_modify('next Thursday') %}
{% set var = day|date_modify('last Monday') %}
{% set var = day|date_modify('next month') %}


(These are equivalents of the php-doc examples )

.

So this weekend would be:

{% set var = day|date_modify('next Friday') %}


Or Saturday, personally I start my weekends on Thursday, so it's hard to give a good example ;)

Next weekend:

{% set var = day|date_modify('next Friday +7 days') %}


Next weekend in one year, half an hour ago:

{% set var = day|date_modify('next Friday +1 year -30 minutes') %}