Sunday, 4 June 2017

Convert LUIS Datetime V2 to JS Date

Is there a builtin helper method in LUIS Sdk or Bot Sdk to convert the LUIS DatetimeV2 entities to JS Date objects? I have seen some have been using Chronic Parser for C# but I couldn't find anything that works for Nodejs.

const dt = builder.EntityRecognizer.findEntity(args.intent.entities, 'datetimeV2');
if (dt) {
    // this is just the matching intent, I believe.
    // example intents; today, yesterday, 2/28, 31/5, ...
    // How do I convert this to a valid Date is where I am stuck.
}



via Kosala Nuwan Perera

No comments:

Post a Comment