Hi I am create an execute code function to generat...
# đź’»developers
c
Hi I am create an execute code function to generate one hour timeslots from a timerange like "9:30 AM to 4:30 PM'. If the user prefers AM timings, the function should generate list of one hour time slots like [9:30 AM, 10:30 AM, 11:30 AM]. The attached javascript code absolutely generates these timeslots correctly when I run it in a javascript compiler. However, when I put this function in execute code, it gives me the error [AssertionError, Unhandled date format passed to MockDate constructor: Thu Oct 19 2023 9:30 AM]. Can you help me as to why this code fails only in Botpress execute code whereas in the javascript compiler it works perfectly fine. How do I fix this issue?