Solved: 9 Years, 2 Months, 3 Weeks ago my_date
#1
Solved: 9 Years, 2 Months, 3 Weeks ago
Hi guys I am using my_date with time relative but it don't show me seconds ago, how to show it?
My Projects - Support My Projects

Don't forget to rate posts!
Reply
#2
Solved: 9 Years, 2 Months, 3 Weeks ago
$variable = my_date('relative', $bla['dateline']);
Reply
#3
Solved: 9 Years, 2 Months, 3 Weeks ago
@sazze with 'relative' it don't show me seconds ago, but show me less than 1 minute ago
My Projects - Support My Projects

Don't forget to rate posts!
Reply
#4
Solved: 9 Years, 2 Months, 3 Weeks ago
(2015-09-11, 01:13 PM)chack1172 Wrote: @sazze with 'relative' it don't show me seconds ago, but show me less than 1 minute ago

You'd have to edit a core file to make it "% seconds ago".
Reply
#5
Solved: 9 Years, 2 Months, 3 Weeks ago
(2015-09-10, 09:10 PM)chack1172 Wrote: Hi guys I am using my_date with time relative but it don't show me seconds ago, how to show it?

Just did this to my forum, and it works:

1. Edit functions.php located in inc folder
2. Find

if($diff <= 60)
{
// Less than a minute
$relative['prefix'] = $lang->rel_less_than;
}

3. Replace it with

if($diff <= 60)
{
// seconds ago
return $diff == 1 ? $diff . ' second ago' : $diff . ' seconds ago';
}

[Image: GyVg8xX.png]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)