bera_ramazan Posted January 1, 2022 Share Posted January 1, 2022 public function timeAgo($ptime) { $etime = time() - strtotime($ptime); $a = array( 12 * 30 * 24 * 60 * 60 => 'year', 30 * 24 * 60 * 60 => 'moon', 7 * 24 * 60 * 60 => 'week', 24 * 60 * 60 => 'day', 60 * 60 => 'hour', 60 => 'sec', 1 => 'sec' ); foreach($a as $secs => $str) { $d = $etime / $secs; if($d >= 1) { $r = round($d); return $r.' '.$str.' '.$this->l('ago'); } } } how to use this->l dont working in function module Link to comment Share on other sites More sharing options...
bera_ramazan Posted January 3, 2022 Author Share Posted January 3, 2022 i sloved Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now