Today is 2014-11-16.
I got these three dates in the future but I want them to be only one date instead.
2014-12-15 21:27:12 2014-12-15 21:32:20 2014-12-16 12:22:09
I want to get the total end date from today. That would be aproximately three month into the future but how can i calculate it to be the same date each time from the three dates above?
How can this be achieved with PHP's DateTime and DateInterval classes?
This might help:
Then,
And so on.
It is highly recommended to take a look at the PHP's DateTime official document.
Note that,
DateTime
is available onPHP
>=5.2.0