Просмотр поста

.
ДоХтор

Devendraoli, if i understand correctly, then you need this option

code (+/-)
public static function display_date($var)
{
    $label = time() - $var;
    
    if ($label < 60) {
        $out = $label .' (s) ago';
    } elseif ($label < 3600) {
        $out = intval($label / 60) .' (m) ago';
    } elseif ($label < (3600 * 24)) {
        $out = intval($label / 3600) .' (h) ago';
    } elseif ($label < (3600 * 24 * date('t'))) {
        $out = intval($label / (3600 * 24)) .' (d) ago';
    } elseif ($label < (3600 * 24 * (date('L') + 365))) {
        $out = intval($label / (3600 * 24 * 30)) .' (m) ago';
    } else {
        $shift = (self::$system_set['timeshift'] + self::$user_set['timeshift']) * 3600;
        $out = date('d.m.Y / H:i', $var + $shift);
    }
    
    return $out;
}