src/UI/SettingsForm.php
public static function getDueDateDelta($time)
    {
        if ( $time < 600 ) {
            $delta = $time . ' seconds';
        } else if ($time < 3600) {
            $delta = sprintf("%0.0f",($time/60.0)) . ' ' . _m('minutes');
        } else if ($time <= 86400 ) {
            $delta = sprintf("%0.2f",($time/3600.0)) . ' ' . _m('hours');
        } else {
            $delta = sprintf("%0.2f",($time/86400.0)) . ' ' . _m('days');
        }
        return $delta;
    }
public static function getDueDateDelta($time)
    {
        if ( $time < 600 ) {
            $delta = $time . ' seconds';
        } else if ($time < 3600) {
            $delta = sprintf("%0.0f",($time/60.0)) . ' ' . _m('minutes');
        } else if ($time <= 86400 ) {
            $delta = sprintf("%0.2f",($time/3600.0)) . ' ' . _m('hours');
        } else {
            $delta = sprintf("%0.2f",($time/86400.0)) . ' ' . _m('days');
        }
        return $delta;
    }
public static function getDueDateDelta ( $ time ) { if ( $ time < 600 ) { $ delta = $ time . ' seconds' ; } else if ( $ time < 3600 ) { $ delta = sprintf ( "%0.0f" , ( $ time / 60.0 ) ) . ' ' . _m ( 'minutes' ) ; } else if ( $ time <= 86400 ) { $ delta = sprintf ( "%0.2f" , ( $ time / 3600.0 ) ) . ' ' . _m ( 'hours' ) ; } else { $ delta = sprintf ( "%0.2f" , ( $ time / 86400.0 ) ) . ' ' . _m ( 'days' ) ; } return $ delta ; }
Show a due date delta in reasonable units
Show a due date delta in reasonable units