webui fixes

This commit is contained in:
SJ
2013-02-16 12:33:25 +01:00
parent 78e750fde5
commit d323e076ac
24 changed files with 779 additions and 10 deletions

View File

@ -460,4 +460,18 @@ function make_short_string($what, $length) {
}
function convert_days_ymd($convert) {
$years = ($convert / 365) ; // days / 365 days
$years = floor($years); // Remove all decimals
$month = ($convert % 365) / 30.5; // I choose 30.5 for Month (30,31) ;)
$month = floor($month); // Remove all decimals
$days = ($convert % 365) % 30.5; // the rest of days
// Return array of years, months, days
return array( $years,$month,$days );
}
?>