PHP date
$ymdDate = date('Y-m-d');
$ymdDateMinus = date('Y-m-01', strtotime(date('Y-m-d', strtotime($ymdDate)).'-1 month'));
$ymdDatePlus = date('Y-m-01', strtotime(date('Y-m-d', strtotime($ymdDate)).'+1 month'));
$ymdLastDay = date('t',strtotime($ymdDate));
$ymdDateName = strftime('%w', strtotime($ymdDate));
$ymdDate = strftime('%d', strtotime($ymdDate));
$ymdMonth = strftime('%m', strtotime($ymdDate));
$ymdMonthOut = strftime('%d.%m.%Y',$ymdDate);
$ymdBetween = (strtotime('2011-06-26')-strtotime('2011-06-20'))/86400;
$diff = strtotime('2011-06-26')-strtotime('2010-06-20');
$years = floor($diff/(365.25*60*60*24));
Related Posts
Replace Link Value PHP, Tips for Optimizing PHP code, How To Clean Special Characters From PHP String