Posted By

SteveMcDaniel on 10/09/09


Tagged

php date tomorrow yesterday strtotime


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

silentbob84


Add or Subtract Days from Date


 / Published in: PHP
 

  1. <?
  2. echo 'Three days from now is: ' . date('m-d-Y', strtotime('+3 days')) . '<br />';
  3. echo 'Next Wednesday is: ' . date('m-d-Y', strtotime('next wednesday')) . '<br />';
  4. echo 'Three Saturdays ago was: ' . date('m-d-Y', strtotime('-3 weeks saturday')) . '<br />';
  5. ?>

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: hiramvb on March 18, 2010

Excelente XD justo lo que estaba buscando

You need to login to post a comment.