> For the complete documentation index, see [llms.txt](https://attr.sygnal.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://attr.sygnal.com/sa5-html/advanced-element-filtering/useful-filtering-examples.md).

# Useful Filtering Examples

## Weekday or Weekend?

Show an element depending whether today is a weekday or weekend, *based on the user's local clock*.&#x20;

<table><thead><tr><th width="200"></th><th>wfu-filter-eval</th><th>wfu-filter-match</th></tr></thead><tbody><tr><td>Today is a Weekday </td><td><code>new Date().getDay() % 6 !== 0</code></td><td><code>[weekday='${(new Date().getDay() % 6 !== 0).toString()}'</code>]</td></tr><tr><td>Today is a Weekend </td><td><code>new Date().getDay() % 6 === 0</code></td><td><code>[weekday!='${(new Date().getDay() % 6 !== 0).toString()}'</code>]</td></tr></tbody></table>

{% hint style="info" %}
Both are untested.&#x20;
{% endhint %}
