Last active
June 19, 2019 14:52
-
-
Save YurePereira/34bbfb3600f4e6aced2eca5edc282a8d to your computer and use it in GitHub Desktop.
Adicionado intervalos de tempo à uma data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $dateTime = new DateTime('2016-12-01 00:00:01'); | |
| echo $dateTime->format('d/m/Y H:i:s') . PHP_EOL; | |
| //Adicionado 40 dias a nossa data | |
| $dateTime->add(new DateInterval('P40D')); | |
| echo $dateTime->format('d/m/Y H:i:s'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment