AlexaSkillsKit.NET
AlexaSkillsKit.NET copied to clipboard
Code to parse datetime ranges sent from alexa
This code parses the azure DATE type, for example:
"Yesterday" "This week" "Last month" "June 2010" "3rd quarter" " Call AlexaDateRangeConverter.Convert() passing in the string from Alexa and the offset of the application time to UTC. This returns an AlexaDateRange with a start and end date of the parsed range.
@ChrisInSeattle Thanks for you contribution! Please sign the Contributor License Agreement (see your pull request) so we can accept it in the project.
does not handle simple "2017" which is a result of saying "this year" or "next year" etc.
I did something similar with parsing the Alexa date for a SQL stored procedure:
https://github.com/smoore4moma/tms-api/blob/master/database/procMomaAlexaExhibitions.sql
The use case is "Alexa, ask {skill} what is happening this weekend"
Weekends look like this in the Alexa response '2019-W20-WE'. I think it would be good to include -WE responses. @ChrisInSeattle
Thanks for the contribution! This definitely might be very useful. Still I'm a bit uncertain whether or not this new classes belong to this core library.
This feels like it's a separate functionality, that doesn't require integration with the library. Anybody interested in this functionality can take appropriate classes from this PR and add to own project with any modifications necessary for person's use case.
So my question would be: Is there any common and documented format for how Alexa dates/date ranges might look like, that would justify making this or similar PR part of this library?