https://retellai.com/?utm_source=discord&utm_medium=seo logo
When testing an agent, I will sometimes prompt it ...
# ❓・ai-evy-support
j
@AI Evy When testing an agent, I will sometimes prompt it to check my calendar 2 weeks from now which is on Cal.com. And I'm using the API. But it will return a date in June which is obviously incorrect. Is this a Cal.com issue or the fact that I am test mode?
a
Thanks for tagging me @joelp3dorl. I'll look through relevant sources and get back to you shortly.
### Answer From Thursday, August 07, 2025, I calculate that 2 weeks from now would be August 21, 2025. The date calculation issue you're experiencing appears to be related to how the AI agent handles relative dates rather than a test mode limitation. Based on the available sources, this is a known issue with Cal.com integrations when using relative date references [(1) ]() [(2) ]() . The problem occurs because AI agents often struggle with date calculations when users provide relative timeframes like "2 weeks from now" rather than specific dates [(2) ]() . To resolve this issue, you should ensure your agent prompt includes proper current time handling [(3) ]() . When setting up the check calendar availability function, you can add a timezone parameter to be used in the function . Additionally, it's recommended to include explicit instructions in your prompt about when to invoke the calendar function :
Copy code
When user stated a time range, please check the calendar availability by calling the `check_calendar_availability` function and let user know whether that range work or not.
The sources indicate that agents work much better when given exact dates like "August 21, 2025" rather than relative references [(2) ]() . You might also want to instruct your agent to convert relative dates to specific dates before making the Cal.com API call. This issue isn't specific to test mode - it's a broader challenge with how AI agents process temporal references in natural language conversations .
​ To learn more, see the sources I considered: [[1] API to Cal.com keeps failing spastically.](https://discord.com/channels/1186424376300679209/1400179427480174592) [[2] Discord message from @melvinglenford on 2025-03-06](https://discord.com/channels/1186424376300679209/1186462578310910112/1347206753783250995) [[3] Check Calendar Availability](https://docs.retellai.com/build/check-availability) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.