sbox2 extends now sbox, new function getDate

This commit is contained in:
Ralf Becker 2001-06-04 18:23:22 +00:00
parent e823b60062
commit 2c0c0d2a40

View File

@ -23,8 +23,9 @@
/* $Id$ */
class sbox2 {
include(PHPGW_API_INC."/class.sbox.inc.php");
class sbox2 extends sbox {
/*
* Function: search for an id of an db-entry, eg. an address
* Parameter: $name base name for all template-vars and of the submitted vars (not to conflict with other template-var-names !!!)
@ -299,4 +300,20 @@
}
return $this->getArrayItem($name,$selected,$aarr,1);
}
function getDate($n_year,$n_month,$n_day,$date)
{
global $phpgw;
if (!$date) {
$day = $month = $year = 0;
} else {
$day = date('d',$date);
$month = date('m',$date);
$year = date('Y',$date);
}
return $phpgw->common->dateformatorder($this->getYears($n_year,$year),
$this->getMonthText($n_month,$month),
$this->getDays($n_day,$day));
}
}