Created
March 3, 2015 22:51
-
-
Save coderdiaz/9dfd76dfa7a301f9ff15 to your computer and use it in GitHub Desktop.
Sumar un intervalo de días en PHP
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 | |
$interval = 7; | |
$fecha = '2015-02-25'; | |
$date = new DateTime(''.$fecha.''); | |
$date->add(new DateInterval('P'.$interval.'D')); | |
echo $date->format('Y-m-d') . "\n"; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment