ysnbulut
Üyeliği Durdurulmuş
Banlı Kullanıcı
-
Üyelik
13.07.2013
-
Yaş/Cinsiyet
35 / E
-
Meslek
öğrenci
-
Konum
Isparta
-
Ad Soyad
Y** B**
-
Mesajlar
158
-
Beğeniler
26 / 18
-
Ticaret
1, (%100)
bi scriptimdeki time ago classını yazayım eğer çözmezsen yardımcı olayım..
public static function timeago($time){
$time=strtotime($time);
$periods = array(e("second"), e("minute"), e("hour"), e("day"), e("week"), e("month"), e("year"), e("decade"));
$lengths = array("60","60","24","7","4.35","12","10");
$now = time();
$difference = $now - $time;
$tense= e("ago");
for($j = 0; $difference >= $lengths[$j] && $j < count($lengths)-1; $j++) {
$difference /= $lengths[$j];
}
$difference = round($difference);
if($difference != 1) {
$periods[$j].= "s";
}
return "$difference $periods[$j] $tense ";
}