From c46fe9b73f585ee1fb032e94b001203b92dee880 Mon Sep 17 00:00:00 2001
From: root <root@localhost.localdomain>
Date: Thu, 30 Sep 2010 23:28:32 -0500
Subject: [PATCH] datetime-class

---
 sites/all/modules/date/date_php4/date_php4.inc |   26 ++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)

diff --git date_php4/date_php4.inc date_php4/date_php4.inc
index c62913c..5f3514b 100644
--- date_php4/date_php4.inc
+++ date_php4/date_php4.inc
@@ -586,6 +586,32 @@ if (!function_exists('timezone_abbreviations_list')) {
   }
 }
 
+if (!class_exists('DateTime')) {
+  class DateTime {
+    public $date;
+  
+    public function __construct($date) {
+        $this->date = strtotime($date);
+    }
+  
+    public function setTimeZone($timezone) {
+        return;
+    }
+  
+    private function __getDate() {
+        return date(DATE_ATOM, $this->date);  
+    }
+  
+    public function modify($multiplier) {
+        $this->date = strtotime($this->__getDate() . ' ' . $multiplier);
+    }
+  
+    public function format($format) {
+        return date($format, $this->date);
+    }
+}
+}
+
 /**
  * Create a timestamp from a datetime value.
  *
-- 
1.7.2.2

