This site is mobile accessible. Press the "Tap Here" button to use a different font-size.


Smartphone icons created by Freepik - Flaticon

PHP Date

date_add() Function

Add 40 days to the 15th of March, 2013:

2013-04-24

<?php
// create the date object March 15, 2013
$date=date_create("2013-03-15");

// use date_add() function to add 40 days
date_add($date,date_interval_create_from_date_string("40 days"));

// display the result
echo date_format($date,"Y-m-d");
?>