I Have Current date. Ho to find Date After 3 Days. I am Using CodeIgniter My Controller is -
public function index()
{
date_default_timezone_set('Asia/Kolkata');
$Curr_Date = date('Y/m/d');
$today_dt = new DateTime($Curr_Date);
}
I Have Current date. Ho to find Date After 3 Days. I am Using CodeIgniter My Controller is -
public function index()
{
date_default_timezone_set('Asia/Kolkata');
$Curr_Date = date('Y/m/d');
$today_dt = new DateTime($Curr_Date);
}
Pretty straight forward. You can do this using the DateTime class:
public function index()
{
date_default_timezone_set('Asia/Kolkata');
$today_dt = new DateTime();
$in3days = new DateTime();
$in3days->add(new DateTimeInterval("PD3"));
}
or you can use strtotime
$in3days = new DateTime(strtotime("+3 days"));