$fromTime = '2013-10-24 11:45';
$toTime = '2013-10-23 11:45';
$accuracy = 3;
echo RUtils::dt()->distanceOfTimeInWords($toTime, $fromTime, $accuracy);
//Returns: 1 день назад
I think it would be better if the phrase would be "Днем ранее" or "Вчера" (if $fromTime is today)
$fromTime = '2013-10-24 11:40';
$toTime = '2013-10-24 11:10';
$accuracy = 3;
echo RUtils::dt()->distanceOfTimeInWords($toTime, $fromTime, $accuracy);
//Returns: 30 минут назад
I think it would be better if the phrase would be "полчаса назад" or "через полчаса" (if the variables $fromTime and $toTime are interchanged)
And other similar examples