[pLog-svn] r5346 - in plog/branches/lifetype-1.2/class/data: . Date

oscar at devel.lifetype.net oscar at devel.lifetype.net
Thu Apr 26 15:54:19 EDT 2007


Author: oscar
Date: 2007-04-26 15:54:19 -0400 (Thu, 26 Apr 2007)
New Revision: 5346

Modified:
   plog/branches/lifetype-1.2/class/data/Date.class.php
   plog/branches/lifetype-1.2/class/data/Date/Span.class.php
Log:
fixed bug/recommendation http://bugs.lifetype.net/view.php?id=1290 and http://bugs.lifetype.net/view.php?id=1291 -- removed all the methods that depend on Date_Calc::dateDiff(), which doesn't work because we removed some stuff related to time zones (so that Date_TimeZone wouldn't be a massive file with all the timezones ever needed by humanity) The remaining methods are goog enough for our needs in the core, but apparently some enterprising developers had developed some functionality around some of these methods but realized that didn't work because of the missing calls. So what we're going to do is truly remove the methods that don't work in order to stop the confusion.


Modified: plog/branches/lifetype-1.2/class/data/Date/Span.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/data/Date/Span.class.php	2007-04-25 03:15:50 UTC (rev 5345)
+++ plog/branches/lifetype-1.2/class/data/Date/Span.class.php	2007-04-26 19:54:19 UTC (rev 5346)
@@ -459,7 +459,7 @@
      *
      * @access public
      */
-    function setFromDateDiff($date1, $date2)
+    /*function setFromDateDiff($date1, $date2)
     {
         if (!is_a($date1, 'date') or !is_a($date2, 'date')) {
             return false;
@@ -480,7 +480,7 @@
             $days * 86400 + $hours * 3600 + $mins * 60 + $secs
         );
         return true;
-    }
+    }*/
 
     /**
      * Set the time span from another time object.

Modified: plog/branches/lifetype-1.2/class/data/Date.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/data/Date.class.php	2007-04-25 03:15:50 UTC (rev 5345)
+++ plog/branches/lifetype-1.2/class/data/Date.class.php	2007-04-26 19:54:19 UTC (rev 5346)
@@ -743,7 +743,7 @@
      * @param object Date $d2 the second date
      * @return int 0 if the dates are equal, -1 if d1 is before d2, 1 if d1 is after d2
      */
-    function compare($d1, $d2)
+    /*function compare($d1, $d2)
     {
         // $d1->convertTZ(new Date_TimeZone('UTC'));
         $d2->convertTZ(new Date_TimeZone('UTC'));
@@ -758,7 +758,7 @@
         if ($d1->second < $d2->second) return -1;
         if ($d1->second > $d2->second) return 1;
         return 0;
-    }
+    }*/
 
     /**
      * Test if this date/time is before a certain date/time
@@ -769,14 +769,14 @@
      * @param object Date $when the date to test against
      * @return boolean true if this date is before $when
      */
-    function before($when)
+    /*function before($when)
     {
         if (Date::compare($this,$when) == -1) {
             return true;
         } else {
             return false;
         }
-    }
+    }*/
 
     /**
      * Test if this date/time is after a certian date/time
@@ -787,14 +787,14 @@
      * @param object Date $when the date to test against
      * @return boolean true if this date is after $when
      */
-    function after($when)
+    /*function after($when)
     {
         if (Date::compare($this,$when) == 1) {
             return true;
         } else {
             return false;
         }
-    }
+    }*/
 
     /**
      * Test if this date/time is exactly equal to a certian date/time
@@ -805,14 +805,14 @@
      * @param object Date $when the date to test against
      * @return boolean true if this date is exactly equal to $when
      */
-    function equals($when)
+    /*function equals($when)
     {
         if (Date::compare($this,$when) == 0) {
             return true;
         } else {
             return false;
         }
-    }
+    }*/
 
     /**
      * Determine if this date is in the future
@@ -822,7 +822,7 @@
      * @access public
      * @return boolean true if this date is in the future
      */
-    function isFuture()
+    /*function isFuture()
     {
         $now = new Date();
         if ($this->after($now)) {
@@ -830,7 +830,7 @@
         } else {
             return false;
         }
-    }
+    }*/
 
     /**
      * Determine if this date is in the past
@@ -840,7 +840,7 @@
      * @access public
      * @return boolean true if this date is in the past
      */
-    function isPast()
+    /*function isPast()
     {
         $now = new Date();
         if ($this->before($now)) {
@@ -848,7 +848,7 @@
         } else {
             return false;
         }
-    }
+    }*/
 
     /**
      * Determine if the year in this date is a leap year



More information about the pLog-svn mailing list