I'm trying to make a URL that will (eventually) print out JSON for jquery FullCalendar to use. I'm using Low Events to do this, but I'm having some trouble with getting the start and end dates from the url..
The url itself is formatted like this /ajax/events?start=1384869883&end=1385042714
The code I have on that template is this:
{exp:low_events:entries channel="events" date_from="{exp:low_nice_date date="{get:start}" format="%Y-%m-%d"}" date_to="{exp:low_nice_date date="{get:end}" format="%Y-%m-%d"}" unit="custom"}
{entry_id}
{/exp:low_events:entries}
When turning on debugging, I'm getting this error:
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string ({exp:low_nice_date date=) at position 0 ({): Unexpected character' in /home/user/public_html/example.com/system/expressionengine/third_party/low_events/libraries/Low_date.php on line 448 Exception: DateTime::__construct(): Failed to parse time string ({exp:low_nice_date date=) at position 0 ({): Unexpected character in /home/user/public_html/example.com/system/expressionengine/third_party/low_events/libraries/Low_date.php on line 448 Call Stack: 0.0003 693672 1. {main}() /home/user/public_html/example.com/index.php:0 0.0008 777272 2. require_once('/home/user/public_html/example.com/system/codeigniter/system/core/CodeIgniter.php') /home/user/public_html/example.com/index.php:188 0.2111 16059624 3. call_user_func_array() /home/user/public_html/example.com/system/codeigniter/system/core/CodeIgniter.php:319 0.2111 16059760 4. EE->index() /home/user/public_html/example.com/system/codeigniter/system/core/CodeIgniter.php:0 0.2111 16059840 5. EE_Core->generate_page() /home/user/public_html/example.com/system/expressionengine/controllers/ee.php:68 0.2201 17906008 6. EE_Template->run_template_engine() /home/user/public_html/example.com/system/expressionengine/libraries/Core.php:693 0.2209 17999968 7. EE_Template->fetch_and_parse() /home/user/public_html/example.com/system/expressionengine/libraries/Template.php:184 0.2608 19299776 8. EE_Template->parse() /home/user/public_html/example.com/system/expressionengine/libraries/Template.php:236 0.2627 19306040 9. EE_Template->tags() /home/user/public_html/example.com/system/expressionengine/libraries/Template.php:462 0.3258 19327744 10. EE_Template->process_tags() /home/user/public_html/example.com/system/expressionengine/libraries/Template.php:928 0.3605 25814976 11. Low_events->entries() /home/user/public_html/example.com/system/expressionengine/libraries/Template.php:1308 0.3605 25815056 12. Low_events->_init_date() /home/user/public_html/example.com/system/expressionengine/third_party/low_events/mod.low_events.php:174 0.3606 25815320 13. Low_date->init() /home/user/public_html/example.com/system/expressionengine/third_party/low_events/mod.low_events.php:1487 0.3606 25815712 14. Low_date->_from_string() /home/user/public_html/example.com/system/expressionengine/third_party/low_events/libraries/Low_date.php:114 0.3606 25816192 15. DateTime->__construct() /home/user/public_html/example.com/system/expressionengine/third_party/low_events/libraries/Low_date.php:448
When doing a var_dump($date_from)
inside of the Low_events::_init_date()
method, it prints out string(24) "{exp:low_nice_date date="
.
Any suggestions on how to fix this?