10–16 Aug

Kipps.AI Developer Hackathon: Build agentic AI workflows on real production infra.

Explore
Compare Dates Function
AI Agents — Function Calls

Compare Dates Function

Nishit Chittora
Nishit Chittora
August 4, 2026

Introduction

We're introducing the new "Compare Dates" function, a powerful tool for your WhatsApp Agent and AI Chat Agent bots. This function allows your agents to accurately determine if a date provided by a customer is in the past, present, or future, without relying on the AI's internal reasoning about time.

Feature Highlights

  • Reliable Date Comparison: Agents can now call a dedicated function to check dates, ensuring consistent and accurate results based on a predefined time zone.
  • Configurable Time Zone: Administrators can set a specific IANA time zone for the function, eliminating ambiguity and preventing errors caused by the AI guessing or converting time zones.
  • Unified Functionality: The "Compare Dates" function works identically across both WhatsApp Agent and AI Chat Agent bots, providing a consistent experience.

How to Use

  1. Open a WhatsApp Agent or AI Chat Agent's Functions page.
  2. Click "Add Function" → "Compare Dates".
  3. Optionally add a description, then pick a Time Zone from the dropdown (defaults to UTC if left unset) and save.
  4. Reference the function (compare_dates) in the agent's instructions — the AI only needs to pass the date it wants to check; it returns how many days in the past/future that date is (negative = past, 0 = today, positive = future), computed using the configured time zone.

Benefits

  • Eliminates Date-Related Bugs: Removes a recurring bug class where the AI accepted delivery dates that had already passed because it was reasoning about "today" and time zones in its own head.
  • Ensures Time Zone Accuracy: Time zone is set once by whoever configures the function, from a validated dropdown of common IANA time zones — no free-text typos, no relying on the model to guess or convert time zones correctly.
  • Consistent Agent Behavior: Works identically for both WhatsApp Agent and AI Chat Agent bots.

Example Workflow

A customer messages a WhatsApp Agent asking to schedule a delivery for "yesterday". Previously, the AI might have struggled to correctly interpret "yesterday" in relation to the current date and time zone, potentially accepting an impossible delivery. With the "Compare Dates" function, the agent is instructed to call compare_dates with the customer's requested date. The function returns a negative number, indicating the date is in the past. The agent can then politely inform the customer that the requested date has passed and prompt them for a new, valid delivery date, ensuring a smooth and accurate interaction.

Result

Your AI Agents can now leverage the "Compare Dates" function to accurately and reliably process customer-provided dates, ensuring consistent behavior and preventing common errors related to time zone interpretation and past dates.

See Also

  • Check/Schedule/Reschedule Google Calendar Availability
  • Assign to Human Agent
  • Tag Contact

Ready to try these new features?

Experience the latest improvements and see how they can enhance your workflow. Get started today or learn more about what's coming next.

Related Blog Posts

Ready to Get Started?

Transform Your Customer Experience Today

Join 50+ companies already using Kipps.AI to automate conversations, boost customer satisfaction, and drive unprecedented growth.