|
is dateSee if a string is actually a date (used for friendly urls mostly)
// See if a string from the url is an actual date
function isDate($var){
$time = strtotime(str_replace('-', ' ', $var));
if($time){
if(strlen($var) == 8){
return Array('month', $var, $time);
}elseif(strlen($var) == 11){
return Array('day', $var, $time);
}
}
return false;
}
|
Swedish proverb
I de grundaste vattnen går de fulaste fiskarna In the shallowest waters, the ugliest fish swim |