You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/getting-elements/event-queries.md
-64Lines changed: 0 additions & 64 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,38 +51,6 @@ Event queries support the following parameters:
51
51
52
52
<!-- BEGIN PARAMS -->
53
53
54
-
### `after`
55
-
Narrows the query results to only events that were posted on or after a certain date.
56
-
57
-
Possible values include:
58
-
59
-
| Value | Fetches events…
60
-
| - | -
61
-
| `'2018-04-01'` | that were posted after 2018-04-01.
62
-
| a [DateTime](http://php.net/class.datetime) object | that were posted after the date represented by the object.
63
-
64
-
::: code
65
-
```twig Twig
66
-
{# Fetch events posted this month #}
67
-
{% set firstDayOfMonth = date('first day of this month') %}
68
-
69
-
{% set events = craft.events.events()
70
-
.after(firstDayOfMonth)
71
-
.all() %}
72
-
```
73
-
74
-
```php PHP
75
-
// Fetch events posted this month
76
-
$firstDayOfMonth = new \DateTime('first day of this month');
77
-
78
-
$events = \verbb\events\elements\Event::find()
79
-
->after($firstDayOfMonth)
80
-
->all();
81
-
```
82
-
:::
83
-
84
-
85
-
86
54
### `anyStatus`
87
55
Clears out the [status()](https://docs.craftcms.com/api/v4/craft-elements-db-elementquery.html#method-status) and [enabledForSite()](https://docs.craftcms.com/api/v4/craft-elements-db-elementquery.html#method-enabledforsite) parameters.
0 commit comments