note 46306 deleted from function.date by sean
| From: | sean@php.net | Date: | Wed, 06 Oct 2004 15:49:03 +0000 |
| Subject: | note 46306 deleted from function.date by sean | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-78074@lists.php.net to get a copy of this message | ||
Note Submitter: selman17 at yahoo dot com
----
one year later code
<?php
$tarih = date("Y-m-d");
echo "to day date $tarih <br>";
//this out put 2004-10-06
$tarih_=explode("-",$tarih);
$tarihy =$tarih_[0];
$tarihm =$tarih_[1];
$tarihd =$tarih_[2];
$akl = getdate();
$un= mktime(0, 0, 0, $tarihm, $tarihd, $tarihy);
$un_ = (($un)*1) + (60*60*24*364);
echo "Next Year Later : ".date("Y-m-d",$un_);
//this out put 2005-10-05 ( one day previous from next year )
$un_ = (($un)*1) + (60*60*24*365);
echo "Next Year Later : ".date("Y-m-d",$un_);
//this out put 2005-10-06 (Next Year)
?>