Compare Date Month Year etc.

// Find Today
    function today()
    {
        return date('Y-m-d');
    }


// Find Yesterday   
    function yesterday()
    {
        return date("Y-m-d", strtotime("yesterday"));
    }
 

// Find Current Week   
    function currentweek()
    {
        return date('Y-m-d'). ' To ' .date('Y-m-d', strtotime('-7 days'));
    }
 

// Find Last Week   
    function lastweek()
    {
        return date('Y-m-d', strtotime('-7 days')). ' To ' . date('Y-m-d', strtotime('-13 days'));
    }
 

// Find Current Month   
    function currentmonth()
    {
        return date('Y-m');
    }
 

// Find Last Month   
    function lastmonth()
    {
        return date("Y-m", strtotime("previous month"));
    }
 

// Find Current Year   
    function currentyear()
    {
        return date("Y");
    }
 

// Find Last Year   
    function lastyear()
    {
        return date("Y", strtotime("last year"));
    }

Loading
Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Flying Twitter Bird Widget By ICT Sparkle