From 003ef39d1154ea9861bc8ae26e90654e69c34a45 Mon Sep 17 00:00:00 2001 From: jengo Date: Wed, 4 Apr 2001 06:49:03 +0000 Subject: [PATCH] Added ending date option --- phpgwapi/inc/class.sbox.inc.php | 53 ++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 18 deletions(-) diff --git a/phpgwapi/inc/class.sbox.inc.php b/phpgwapi/inc/class.sbox.inc.php index 4075a49711..86b0a03e49 100644 --- a/phpgwapi/inc/class.sbox.inc.php +++ b/phpgwapi/inc/class.sbox.inc.php @@ -126,25 +126,42 @@ return $out; } - function getYears($name, $selected=0, $startYear=0) - { + function getYears($name, $selected = 0, $startYear = 0, $endyear = 0) + { - if(!$startYear) $startYear = date('Y'); - $out = ''."\n"; - return $out; - } + if (!$startYear) + { + $startYear = date('Y') - 2; + } + + if (!$endyear) + { + $endyear = date('Y') + 5; + } + + $out = ''."\n"; + + return $out; + } function getPercentage($name, $selected=0) {