Created
September 18, 2020 04:24
-
-
Save iaindooley/b278a1414cdb77c4fd9f368d56970ec4 to your computer and use it in GitHub Desktop.
Parse date from emailed card
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function parseDateFromEmailedCard(notification) | |
{ | |
var created = new Notification(notification).createdCard(); | |
try | |
{ | |
var parsed = Trellinator.parseDate(created.name()); | |
created.setName(parsed.comment);//remove the date from the title | |
created.setDue(parsed.date);//set due on the parsed date | |
} | |
catch(e) | |
{ | |
//couldn't parse a date, do nothing | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment