summaryrefslogtreecommitdiff
path: root/lib/util.php
diff options
context:
space:
mode:
authorzach <zach@copley.name>2008-07-16 18:02:23 -0400
committerzach <zach@copley.name>2008-07-16 18:02:23 -0400
commitac2d811a469b7109f34065bf13e31a5b5954dd0b (patch)
tree3be7a5199abbba30763f5cf8e6e64243137b9557 /lib/util.php
parentfba25b0d9810dac55a27feed173437a2a2f61364 (diff)
Twitter-compatible API - code cleanup
darcs-hash:20080716220223-ca946-e3eed117cded61eb9c2d2805fd07758f883fb85b.gz
Diffstat (limited to 'lib/util.php')
-rw-r--r--lib/util.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/util.php b/lib/util.php
index d461a0a03..9f235494b 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -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",