Skip to content

Instantly share code, notes, and snippets.

@SimonLlewellyn
Created May 1, 2017 23:42
Show Gist options
  • Save SimonLlewellyn/e80f8e1dcffa913ba76a12d35ee83bf3 to your computer and use it in GitHub Desktop.
Save SimonLlewellyn/e80f8e1dcffa913ba76a12d35ee83bf3 to your computer and use it in GitHub Desktop.
daysRemaining(date1,date2)
<cfscript>
function daysRemaining(date1,date2) {
var numDays = 0;
while (date1 LT date2) {
date1 = dateAdd("w",1,date1);
numDays = numDays + 1;
}
return numDays;
}
</cfscript>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment