Removed:
trunk/schoorbs-tests/time-tests/toTimeString.test.php
Modified:
trunk/schoorbs-includes/time.functions.php
trunk/schoorbs-tests/time.tests.php
Log:
Removed obsolete toTimeString function
Modified: trunk/schoorbs-includes/time.functions.php
==============================================================================
--- trunk/schoorbs-includes/time.functions.php (original)
+++ trunk/schoorbs-includes/time.functions.php Mon Nov 3 08:26:33 2008
@@ -117,34 +117,6 @@
}
/**
- * Format the duration as nice time-string
- *
- * @param $dur int
- * @param $units string
- * @author Uwe L. Korn <uw...@xhochy.org>
- */
-function toTimeString(&$dur, &$units)
-{
- if ($dur >= 60) {
- $dur /= 60;
- if ($dur >= 60) {
- $dur /= 60;
- if (($dur >= 24) && ($dur % 24 == 0)) {
- $dur /= 24;
- if (($dur >= 7) && ($dur % 7 == 0)) {
- $dur /= 7;
- if (($dur >= 52) && ($dur % 52 == 0)) {
- $dur /= 52;
- $units = get_vocab('years');
- } else $units = get_vocab('weeks');
- } else $units = get_vocab('days');
- } else $units = get_vocab('hours');
- } else $units = get_vocab('minutes');
- } else $units = get_vocab('seconds');
-}
-
-
-/**
* Format the duration as a nice period-string
*
* @param $start_period int
Modified: trunk/schoorbs-tests/time.tests.php
==============================================================================
--- trunk/schoorbs-tests/time.tests.php (original)
+++ trunk/schoorbs-tests/time.tests.php Mon Nov 3 08:26:33 2008
@@ -55,7 +55,6 @@
$suite->addTestSuite('Time_GetTomorrowTest');
$suite->addTestSuite('Time_GetNextWeekTest');
$suite->addTestSuite('Time_GetLastWeekTest');
- $suite->addTestSuite('Time_ToTimeStringTest');
$suite->addTestSuite('Time_ToPeriodStringTest');
return $suite;