Add days to a date


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. function dayadd($g,$dayYmd) {
  2. //add $g days to $dayYmd (date is in YYYY-MM-DD format)
  3. $d = strtotime($dayYmd);
  4. $cc = 24*60*60*$g + 60*60 + $d;
  5. return date("Y-m-d",$cc);
  6. }

URL: http://www.barattalo.it

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.