<?

function vremja($time)

{

global $timesdvig;

$timep="".date("j M Y в H:i", $time)."";

$time_p[0]=date("j n Y", $time);

$time_p[1]=date("H:i", $time);


if ($time_p[0]==date("j n Y", time()+$timesdvig))

{

$timep="Сегодня в $time_p[1]";

}


if ($time_p[0]==date("j n Y", time()+$timesdvig-86400))

{

$timep="Вчера в $time_p[1]";

}





$timep=str_replace("Jan","Янв",$timep);

$timep=str_replace("Feb","Фев",$timep);

$timep=str_replace("Mar","Марта",$timep);

$timep=str_replace("May","Мая",$timep);

$timep=str_replace("Apr","Апр",$timep);

$timep=str_replace("Jun","Июня",$timep);

$timep=str_replace("Jul","Июля",$timep);

$timep=str_replace("Aug","Авг",$timep);

$timep=str_replace("Sep","Сент",$timep);

$timep=str_replace("Oct","Окт",$timep);

$timep=str_replace("Nov","Ноября",$timep);

$timep=str_replace("Dec","Дек",$timep);

return $timep;

}

?>

