Hey All,
I have a date script defining the end dates of thirteen 28 day marketing periods for a year, dynamically assigned to the variable '$period' Conditonally, I would like to add 4 days to that value -- something like if($_group =='2') {$period = $period+4days; } How can this be done?
$start = strtotime("first tuesday jan $year");
$te = (28 * (3600*24));
while($x<=12){
$f += $te;
++$x;
$marketingCycle[] = date('Y-m-d',($start+$f))."\n";
}
$period_1 = date('Y-m-d',$start);
$today = date(Y-m-d);
if ($today < $period_1) {
$period = $period_1;
}else if ($today < $marketingCycle[0]){
$period = $marketingCycle[0];
}else if ($today < $marketingCycle[1]) {
$period = $marketingCycle[1];
}else if ($today < $marketingCycle[2]) {
$period = $marketingCycle[2];
//etc.