2015-09-10, 09:10 PM
2015-09-11, 11:53 AM
$variable = my_date('relative', $bla['dateline']);
2015-09-11, 01:13 PM
@sazze with 'relative' it don't show me seconds ago, but show me less than 1 minute ago
2015-09-11, 08:03 PM
(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".
2015-10-03, 06:52 AM
(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';
}