I need to add 15 days more to current date in Joomla excluding Sat and Sun.
I added it with following code:
But it doesn't exclude Saturday and Sunday. Any idea how can I do it?
You should be able to use the following if you want to add 15 working/business days:
$date = JFactory::getDate(); $newDate = new JDate($date . ' +15 Weekday'); $toFormat = $newDate->format('Y-m-d');
Today is the 24th April 2015, so
$date (excluding the time), will output the following:
$toFormat will output the following: