This little function returns the current date stamp.
//get the current timestamp
$currdate = gmdate(\"Ymd\");
$currday = substr($currdate,6,2);
$currmonth = substr($currdate,4,2);
$curryear = substr($currdate,0,4);
$currdate_stamp = ($curryear . \"-\" . $currmonth . \"-\" . $currday);
}//end of function get_current_datestamp;
$current_datestamp = get_current_datestamp()
It\’s kind of cool if you want to query a database and need a date based result – e.g. news added that day, people on holiday that day.