apply_filters( 'tribe_events_rest_use_inclusive_start_end_dates', bool $use_inclusive )

Allows users to override the default “inclusive” start and end dates and make the REST API use a timezone-adjusted date range.

Example: wp-json/tribe/events/v1/events?start_date=2017-12-21&end_date=2017-12-22

  • The "inclusive" behavior, which is the default here, would set start_date to 2017-12-21 00:00:00 and end_date to 2017-12-22 23:59:59. Events within this range will be retrieved.

  • If you set this filter to true on a site whose timezone is America/New_York, then the REST API would set start_date to 2017-12-20 19:00:00 and end_date to 2017-12-21 19:00:00. A different range of events to draw from.


Parameters

$use_inclusive

(bool) Defaults to false (inclusive, not strict). Whether to use "inclusive" start and end dates.


Top ↑

Source

File: src/Tribe/REST/V1/Endpoints/Archive_Event.php


Top ↑

Changelog

Changelog
Version Description
4.6.8 Introduced.