Hi all,
I need to develop a logic within Adobe campaign classic to stop the recurring delivery on sundays and holidays and delivery should be sent out on next working day in a way that it includes previous day target also. If there is Sunday and holiday in a row then next working day delivery should include all the recipient missed due to holidays.
Is there any way to achieve the same.
Thanks in advance.
Roopal
Solved! Go to Solution.
Hi Roopal,
2 solutions:
Regards
J-Serge
Hi Jean,
Thank you for suggestion.
Could you please explain more on planification activity. May be a screenshot will help.
Views
Replies
Total Likes
Hi,
i have used javascript to check if particular day is weekend or US holiday or any company specific holiday and also hard coded few dates based on business rules. Attached is sample code and not the actual code I have used.
var holidays = { // keys are formatted as month,week,day
"0,2,1": "Martin Luther King, Jr. Day",
"1,2,1": "President's Day",
"2,1,0": "Daylight Savings Time Begins",
"3,3,3": "Administrative Assistants Day",
"4,1,0": "Mother's Day",
"4,-1,1": "Memorial Day",
"5,2,0": "Father's Day",
"6,2,0": "Parents Day",
"8,0,1": "Labor Day",
"8,1,0": "Grandparents Day",
"8,-1,0": "Gold Star Mothers Day",
"9,1,1": "Columbus Day",
"10,0,0": "Daylight Savings Time Ends",
"10,3,4": "Thanksgiving Day"
};
function getDate(year, month, week, day) {
var firstDay = 1;
if (week < 0) {
month++;
firstDay--;
}
var date = new Date(year, month, (week * 7) + firstDay);
if (day < date.getDay()) {
day += 7;
}
date.setDate(date.getDate() - date.getDay() + day);
return date;
}
function getHoliday(month, week, day) {
return holidays[month + "," + week + "," + day];
}
function getDateString(year, month, week, day) {
var date = getDate(year, month, week, day);
var holiday = getHoliday(month, week, day);
var dateString = date.toLocaleDateString();
if (holiday) {
dateString += " \xa0\xa0\xa0" + holiday;
}
return