Twitter-compatible API - code cleanup

darcs-hash:20080716220223-ca946-e3eed117cded61eb9c2d2805fd07758f883fb85b.gz
This commit is contained in:
zach
2008-07-16 18:02:23 -04:00
parent fba25b0d98
commit ac2d811a46
4 changed files with 156 additions and 162 deletions

View File

@@ -861,6 +861,16 @@ function common_date_w3dtf($dt) {
return date(DATE_W3C, $t);
}
function common_date_rfc2822($dt) {
$t = strtotime($dt);
return date("r", $t);
}
function common_date_iso8601($dt) {
$t = strtotime($dt);
return date("c", $t);
}
function common_redirect($url, $code=307) {
static $status = array(301 => "Moved Permanently",
302 => "Found",