[pLog-svn] r2954 - plog/trunk/class/data/Date

oscar at devel.lifetype.net oscar at devel.lifetype.net
Wed Feb 15 16:39:54 GMT 2006


Author: oscar
Date: 2006-02-15 16:39:53 +0000 (Wed, 15 Feb 2006)
New Revision: 2954

Modified:
   plog/trunk/class/data/Date/Calc.class.php
Log:
another missing method. Who commented out these methods anyway?


Modified: plog/trunk/class/data/Date/Calc.class.php
===================================================================
--- plog/trunk/class/data/Date/Calc.class.php	2006-02-15 16:38:13 UTC (rev 2953)
+++ plog/trunk/class/data/Date/Calc.class.php	2006-02-15 16:39:53 UTC (rev 2954)
@@ -708,23 +708,23 @@
 //     * @return string date in given format
 //     */
 //
-//    function prevDay($day='',$month='',$year='',$format='%Y%m%d')
-//    {
-//        if (empty($year)) {
-//            $year = Date_Calc::dateNow('%Y');
-//        }
-//        if (empty($month)) {
-//            $month = Date_Calc::dateNow('%m');
-//        }
-//        if (empty($day)) {
-//            $day = Date_Calc::dateNow('%d');
-//        }
+    function prevDay($day='',$month='',$year='',$format='%Y%m%d')
+    {
+        if (empty($year)) {
+            $year = Date_Calc::dateNow('%Y');
+        }
+        if (empty($month)) {
+            $month = Date_Calc::dateNow('%m');
+        }
+        if (empty($day)) {
+            $day = Date_Calc::dateNow('%d');
+        }
+
+        $days = Date_Calc::dateToDays($day,$month,$year);
+
+        return(Date_Calc::daysToDate($days - 1,$format));
+    } // end func prevDay
 //
-//        $days = Date_Calc::dateToDays($day,$month,$year);
-//
-//        return(Date_Calc::daysToDate($days - 1,$format));
-//    } // end func prevDay
-//
 //    /**
 //     * Sets century for 2 digit year.
 //     * 51-99 is 19, else 20



More information about the pLog-svn mailing list