mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 07:12:26 +02:00
#715 Finalized the fix (added the year for group by day, but it is not displayed)
SVN:trunk[2703]
This commit is contained in:
@@ -468,7 +468,7 @@ abstract class DashletGroupBy extends Dashlet
|
|||||||
|
|
||||||
case 'day_of_month':
|
case 'day_of_month':
|
||||||
$sGroupByLabel = Dict::Format('UI:DashletGroupBy:Prop-GroupBy:DayOfMonth', $sAttLabel);
|
$sGroupByLabel = Dict::Format('UI:DashletGroupBy:Prop-GroupBy:DayOfMonth', $sAttLabel);
|
||||||
$sGroupByExpr = "DATE_FORMAT($sClassAlias.$sAttCode, '%m-%d')"; // mm-dd
|
$sGroupByExpr = "DATE_FORMAT($sClassAlias.$sAttCode, '%Y-%m-%d')"; // mm-dd
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -926,15 +926,15 @@ class FunctionExpression extends Expression
|
|||||||
}
|
}
|
||||||
elseif ($oFormatExpr->Render() == "'%Y-%m'")
|
elseif ($oFormatExpr->Render() == "'%Y-%m'")
|
||||||
{
|
{
|
||||||
// yyyy-mm
|
// yyyy-mm => "yyyy month"
|
||||||
$iMonth = (int) substr($sValue, -2); // the two last chars
|
$iMonth = (int) substr($sValue, -2); // the two last chars
|
||||||
$sRes = substr($sValue, 0, 4).' '.$aMonthToString[$iMonth];
|
$sRes = substr($sValue, 0, 4).' '.$aMonthToString[$iMonth];
|
||||||
}
|
}
|
||||||
elseif ($oFormatExpr->Render() == "'%m-%d'")
|
elseif ($oFormatExpr->Render() == "'%Y-%m-%d'")
|
||||||
{
|
{
|
||||||
// mm-dd
|
// yyyy-mm-dd => "month d"
|
||||||
$iMonth = (int) substr($sValue, 0, 2); // the two first chars
|
$iMonth = (int) substr($sValue, 5, 2);
|
||||||
$sRes = $aMonthToString[$iMonth].' '.substr($sValue, -2);
|
$sRes = $aMonthToString[$iMonth].' '.(int)substr($sValue, -2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $sRes;
|
return $sRes;
|
||||||
|
|||||||
Reference in New Issue
Block a user