Created
August 7, 2019 21:57
-
-
Save parzibyte/b2a34f732dcb359978d61c05fd088997 to your computer and use it in GitHub Desktop.
This file contains 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 | |
/* | |
Fecha de mañana en PHP, con precisión de segundos | |
parzibyte.me/blog | |
*/ | |
$ahora = time(); | |
$unDiaEnSegundos = 24 * 60 * 60; | |
$manana = $ahora + $unDiaEnSegundos; | |
$mananaLegible = date("Y-m-d H:i:s", $manana); | |
# ahoraLegible únicamente es para demostrar | |
$ahoraLegible = date("Y-m-d H:i:s", $ahora); | |
echo "Hoy es $ahoraLegible y mañana es $mananaLegible"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment