[schoorbs commit] r710 - in trunk: schoorbs-includes schoorbs-tests schoorbs-tests/time-tests

0 views
Skip to first unread message

codesite...@google.com

unread,
Nov 3, 2008, 11:32:32 AM11/3/08
to schoor...@googlegroups.com
Author: xhochy
Date: Mon Nov 3 08:27:49 2008
New Revision: 710

Removed:
trunk/schoorbs-tests/time-tests/toPeriodString.test.php
Modified:
trunk/schoorbs-includes/time.functions.php
trunk/schoorbs-tests/time.tests.php

Log:
Removed obsolete toPeriodString 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:27:49 2008
@@ -115,40 +115,3 @@
$aRet[] = date("Y",$i);
return $aRet;
}
-
-/**
- * Format the duration as a nice period-string
- *
- * @param $start_period int
- * @param $dur int
- * @param $units string
- * @author Uwe L. Korn <uw...@xhochy.org>
- */
-function toPeriodString($start_period, &$dur, &$units)
-{
- global $periods;
-
- $max_periods = count($periods);
- $dur /= 60;
-
- if (($dur >= $max_periods) || ($start_period == 0)) {
- if (($start_period == 0) && ($dur == $max_periods)) {
- $units = get_vocab('days');
- $dur = 1;
- return;
- }
-
- $dur /= 60;
- if (($dur >= 24) && is_int($dur)) {
- $dur /= 24;
- $units = get_vocab('days');
- return;
- } else {
- $dur *= 60;
- $dur = ($dur % $max_periods) + floor( $dur/(24*60) ) * $max_periods;
- $units = get_vocab('periods');
- return;
- }
- } else $units = get_vocab('periods');
-}
-

Modified: trunk/schoorbs-tests/time.tests.php
==============================================================================
--- trunk/schoorbs-tests/time.tests.php (original)
+++ trunk/schoorbs-tests/time.tests.php Mon Nov 3 08:27:49 2008
@@ -29,8 +29,6 @@
require_once 'time-tests/getTomorrow.test.php';
require_once 'time-tests/getNextWeek.test.php';
require_once 'time-tests/getLastWeek.test.php';
-require_once 'time-tests/toTimeString.test.php';
-require_once 'time-tests/toPeriodString.test.php';

## The Testsuite ##

@@ -55,7 +53,6 @@
$suite->addTestSuite('Time_GetTomorrowTest');
$suite->addTestSuite('Time_GetNextWeekTest');
$suite->addTestSuite('Time_GetLastWeekTest');
- $suite->addTestSuite('Time_ToPeriodStringTest');

return $suite;
}

Reply all
Reply to author
Forward
0 new messages