Search code examples
ibm-watsonwatson-assistant

Calculating the amount of nights in between two dates in Watson Assistant?


How can I get the Watson Assistant to calculate the amount of nights in between to set dates?

Exp:

Check-in 2019-07-21 Check-Out: 2019-07-28

I'd also like to know how to set an argument so Watson Assistant doesn't allow same day check-ins.


Solution

  • 1) Watson Assistant supports standard methods of the java.util.Date class. You can check the documentation

    2) You can put a comparison condition to check if the two entity values are same or not. Eg - <? @date[0].plusDays(0) == @date[1] ?> For more detail, check this