Skip to content

Instantly share code, notes, and snippets.

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/ee8450469552a37b61cee48bcaae2088 to your computer and use it in GitHub Desktop.
Save iaindooley/ee8450469552a37b61cee48bcaae2088 to your computer and use it in GitHub Desktop.
Set number of dates from 2 dates
function setDays(notification)
{
var changed = new Notification(notification).changedCustomFieldValue();
if(changed.name() == "End")
{
var card = changed.card();
var start = card.customFieldValue("Start");
var end = card.customFieldValue("End");
card.setCustomFieldValue("Days",(end-start)/1000/60/60/24);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment