I'm new to Twilio Studio, Functions, and by extension node.js . I'm trying to create a function that will evaluate the current day and time. If that time is outside the window i want to return false, otherwise true. This is what i have so far:
exports.handler = function(context, event, callback) {
let twiml = new Twilio.twiml.VoiceResponse();
var day = Twilio.Date.toString();
twiml.say(day);
callback(null, twiml);
};
take a look at the below Twilio Function, and modify accordingly.