mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 00:13:35 +01:00
sbox2 extends now sbox, new function getDate
This commit is contained in:
parent
e823b60062
commit
2c0c0d2a40
@ -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));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user