Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created August 7, 2019 21:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/351e1b2c0e6440110dc20bb56249eaa9 to your computer and use it in GitHub Desktop.
Save parzibyte/351e1b2c0e6440110dc20bb56249eaa9 to your computer and use it in GitHub Desktop.
<?php
/*
Fecha de mañana en PHP
parzibyte.me/blog
*/
$ahora = time();
$unDiaEnSegundos = 24 * 60 * 60;
$manana = $ahora + $unDiaEnSegundos;
$mananaLegible = date("Y-m-d", $manana);
# ahoraLegible únicamente es para demostrar
$ahoraLegible = date("Y-m-d", $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