{"id":55576,"date":"2013-07-16T16:01:33","date_gmt":"2013-07-16T23:01:33","guid":{"rendered":"http:\/\/tri.be\/support\/forums\/topic\/tribe_get_events-not-working-as-expected\/"},"modified":"2013-08-19T14:26:18","modified_gmt":"2013-08-19T21:26:18","slug":"tribe_get_events-not-working-as-expected","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tribe_get_events-not-working-as-expected\/","title":{"rendered":"tribe_get_events not working as expected"},"content":{"rendered":"<p>I&#8217;m trying to query a range of events but using tribe_get_events seems to misunderstand the start_date and end_date keys.<\/p>\n<p>So far I have one event that starts and ends on Sep 11, 2013 and when I execute:<\/p>\n<p>$events = tribe_get_events(array(&#8216;start_date&#8217; =&gt; &#8217;10 Sep 2013&#8242;, &#8216;end_date&#8217; =&gt; &#8217;15 Sep 2013&#8242;, &#8216;eventDisplay&#8217; =&gt; &#8216;all&#8217;));<\/p>\n<p>it returns an empty array. When I execute:<\/p>\n<p>$events = tribe_get_events(array(&#8216;start_date&#8217; =&gt; &#8217;10 Sep 2013&#8242;, &#8216;eventDisplay&#8217; =&gt; &#8216;all&#8217;));<\/p>\n<p>it returns the one event however when I execute:<\/p>\n<p>$events = tribe_get_events(array(&#8216;start_date&#8217; =&gt; &#8217;20 Sep 2013&#8242;, &#8216;eventDisplay&#8217; =&gt; &#8216;all&#8217;));<\/p>\n<p>it still returns the one event.<\/p>\n<p>I&#8217;m not sure if something changed in version 3.0; I found this usage in the <a href=\"https:\/\/theeventscalendar.com\/support\/documentation\/the-events-calendar-template-tags-general-functions\/#functiontribe_get_events\">2.0 documentation<\/a> but when I looked up the function in the <a href=\"http:\/\/docs.tri.be\/Events-Calendar\/function-tribe_get_events.html\">3.0 documentation<\/a>, the document contains very little useful information.<\/p>\n<p>Is this a bug or has the API changed?<\/p>\n","protected":false},"template":"","class_list":["post-55576","topic","type-topic","status-closed","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>tribe_get_events not working as expected -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tribe_get_events-not-working-as-expected\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"tribe_get_events not working as expected -\" \/>\n<meta property=\"og:description\" content=\"I&#8217;m trying to query a range of events but using tribe_get_events seems to misunderstand the start_date and end_date keys. So far I have one event that starts and ends on Sep 11, 2013 and when I execute: $events = tribe_get_events(array(&#8216;start_date&#8217; =&gt; &#8217;10 Sep 2013&#8242;, &#8216;end_date&#8217; =&gt; &#8217;15 Sep 2013&#8242;, &#8216;eventDisplay&#8217; =&gt; &#8216;all&#8217;)); it returns an [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tribe_get_events-not-working-as-expected\/\" \/>\n<meta property=\"article:modified_time\" content=\"2013-08-19T21:26:18+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tribe_get_events-not-working-as-expected\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tribe_get_events-not-working-as-expected\/\",\"name\":\"tribe_get_events not working as expected -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2013-07-16T23:01:33+00:00\",\"dateModified\":\"2013-08-19T21:26:18+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tribe_get_events-not-working-as-expected\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tribe_get_events-not-working-as-expected\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tribe_get_events-not-working-as-expected\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/theeventscalendar.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\/\/theeventscalendar.com\/support\/topics\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Calendar Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Events Calendar PRO\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"tribe_get_events not working as expected\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\",\"url\":\"https:\/\/theeventscalendar.com\/support\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"tribe_get_events not working as expected -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tribe_get_events-not-working-as-expected\/","og_locale":"en_US","og_type":"article","og_title":"tribe_get_events not working as expected -","og_description":"I&#8217;m trying to query a range of events but using tribe_get_events seems to misunderstand the start_date and end_date keys. So far I have one event that starts and ends on Sep 11, 2013 and when I execute: $events = tribe_get_events(array(&#8216;start_date&#8217; =&gt; &#8217;10 Sep 2013&#8242;, &#8216;end_date&#8217; =&gt; &#8217;15 Sep 2013&#8242;, &#8216;eventDisplay&#8217; =&gt; &#8216;all&#8217;)); it returns an [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tribe_get_events-not-working-as-expected\/","article_modified_time":"2013-08-19T21:26:18+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tribe_get_events-not-working-as-expected\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tribe_get_events-not-working-as-expected\/","name":"tribe_get_events not working as expected -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2013-07-16T23:01:33+00:00","dateModified":"2013-08-19T21:26:18+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tribe_get_events-not-working-as-expected\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/tribe_get_events-not-working-as-expected\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tribe_get_events-not-working-as-expected\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/theeventscalendar.com\/support\/"},{"@type":"ListItem","position":2,"name":"Topics","item":"https:\/\/theeventscalendar.com\/support\/topics\/"},{"@type":"ListItem","position":3,"name":"Calendar Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/"},{"@type":"ListItem","position":4,"name":"Events Calendar PRO","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/"},{"@type":"ListItem","position":5,"name":"tribe_get_events not working as expected"}]},{"@type":"WebSite","@id":"https:\/\/theeventscalendar.com\/support\/#website","url":"https:\/\/theeventscalendar.com\/support\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/55576","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/55576\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=55576"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}