setDate

suggest change

setDate sets the date in a DateTime object.

$date = new DateTime();
$date->setDate(2016, 7, 25);

This example sets the date to 25 July 2016. setDate leaves the time unchanged, so the clock portion is whatever the object already had, for example:

2016-07-25 17:52:15.819442

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents