Our dev team encountered an issue recently where an audience we created to track the number of days from the current day has stopped working. For example, if I chose to book at trip for 3/23, I'd be counting 10 days from today, and would subsequently be placed within a 0 - 10 audience segment. However, we have several audiences that utilize this profile script, that are now grossly under-reporting data.
As mentioned, the following script has worked for months, and suddenly has stopped. When I put it in Console, I get an "Illegal return statement" error message.
While I didn't write this, can anyone tell if there's a problem with this script, or determine if something larger is the issue?
//Grab the check-in day and month
var taoCheckInDay = page.param('qCiD'),
taoCheckInMonth = page.param('qCiMy');
// Change check-in month and day into a Date object
var taoCheckInYear = taoCheckInMonth.substring(2, 6); // Creates something like 2016
var taoCheckInMonth = taoCheckInMonth.substring(0, 2); // Should now just be 00 through 11
var taoCheckInDate = new Date(taoCheckInYear, taoCheckInMonth, taoCheckInDay);
var taoToday = new Date();
// Take those dates and determine how far away is the check-in date