Skip to content

Instantly share code, notes, and snippets.

@iaindooley
Created February 18, 2019 06:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iaindooley/81d6004b4bd174bfd6fa11e9a460be14 to your computer and use it in GitHub Desktop.
Save iaindooley/81d6004b4bd174bfd6fa11e9a460be14 to your computer and use it in GitHub Desktop.
Add date from email
function addDateFromEmail(notification)
{
var card = new Notification(notification).createdCard();
try
{
var data = Trellinator.parseDate(card.name());
card
.setDue(data.date)
.setName(data.comment);
}
catch(e)
{
Trellinator.log("Not setting due date on "+card.link()+" because no date strings were found: "+e);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment