Date/Time in PHP


<?PHP
     //Current Year
    $year = date("Y");      //2013
   
    //Current Month
    $month = date("m");    //08
   
    //Current day
    $day = date("d");     //12
   
    //Tomorrow's day
    $day = date("d")+1;    //13   

         //TODAY'S DATE
         $start =  date("Y-m-d");    //2013-08-12
    
         //1 MONTH FROM TODAY
         $end = date("Y-m-d",strtotime("+1 months"));     //2013-09-12

         //5 DAYS FROM TODAY
        $reminder = date("Y-m-d",strtotime("+5 days"));    //2013-08-17

         //1 YEAR FROM TODAY
         $record = date("Y-m-d",strtotime("+1 years"));    //2014-08-12

?>

Comments

Popular posts from this blog

Ghostscript Installation and Configuration in Windows 7

Joomla - Get user id