Adding days to a getdate function

138 Views Asked by At

I would like to add more dates to my hikashop invoice. At default there is only creation date:

<?php echo JText::_('DÁTUM VYHOTOVENIA').': '.hikashop_getDate($this->element->order_created,'%d %B %Y ');?>

I would like to add two more dates (creation date + 5 days, and creation date + 20 days). Can you please help me how to do this? Thank you.

1

There are 1 best solutions below

0
On

Try this,

$add_days = 5;
$date_fivedays = date('Y-m-d',strtotime($this->element->order_created) + (24*3600*$add_days));

$add_days = 20;
$date_twentydays = date('Y-m-d',strtotime($this->element->order_created) + (24*3600*$add_days));

Hope its helps..