I came across this javascript on stack overflow that will calculate the billable days in each quarter and how many days are remaining in the quarter. I am not sure how to edit this script to work in Skuid. I am hoping someone can help me to get it working. Thank You!
What Quarter we are in:
function getQuarter(d) {<br> d = d || new Date(); // If no date supplied, use today<br> var q = [4,1,2,3];<br> return q[Math.floor(d.getMonth() / 3)];<br>}
How many days remaining in Quarter:
function daysLeftInQuarter(d) {<br>d = d || new Date();<br>var qEnd = new Date(d);<br>qEnd.setMonth(qEnd.getMonth() + 3 - qEnd.getMonth() % 3, 0);<br>return Math.floor((qEnd - d) / 8.64e7);<br>}
