function estDueDate($w_days='',$est_timestamp='',$ship_date=''){ $date = new DateHelper; $est_day = 0; if($ship_date != ''){ $est_day = $date->getWorkingDays(date('Y-m-d'),$ship_date); return floor($est_day); } else { $est_date = date("Y-m-d h:i:s A", $date->addBusinessDays($est_timestamp,$w_days)); return $est_date; } } /////end of function estDueDate
function estDueDate($w_days = '', $est_timestamp = '', $ship_date = '') { $date = new DateHelper(); $est_day = 0; if ($ship_date) { $est_day = $date->getWorkingDays(date('Y-m-d'), $ship_date); //echo round($w_days,2).' :: '.date("Y-m-d h:i:s A",$est_timestamp).' :: '.$est_day; return floor($est_day); } else { $est_date = date("Y-m-d h:i:s A", $date->addBusinessDays($est_timestamp, $w_days)); return $est_date; } }