I have two dates in YYYY-MM-DD format. I want to subtract the dates and get the integer value of two numbers between them.
If I have:
var startDate = "2014-09-25";
var endDate = "2014-10-12";
I would want the difference to be 18 days. I was planning on putting it in my Google Analytics, so it could look like this:
query: {
...
start-date: "18daysAgo",
end-date: "today"
}
How would I go about this?