fn seconds_pretty(secs: f64) -> String {
    if secs <= 0.0 {
        return "--".into();
    }

    let d = time::Duration::seconds_f64(secs);

    let weeks = d.whole_weeks();
    let days = d.whole_days();
    let hours = d.whole_hours();
    let minutes = d.whole_minutes();

    let week_string = if weeks == 1 { "week" } else { "weeks" };
    let day_string = if days == 1 { "day" } else { "days" };
    let hour_string = if hours == 1 { "hr" } else { "hrs" };
    let min_string = if minutes == 1 { "min" } else { "mins" };

    if weeks > 0 {
        format!(
            "{:.0} {} {:.0} {}",
            weeks,
            week_string,
            days % DAYS_PER_WEEK,
            day_string
        )
    } else if days > 0 {
        format!(
            "{:.0} {} {:.0} {}",
            days,
            day_string,
            hours % HOURS_PER_DAY,
            hour_string
        )
    } else if hours > 0 {
        format!(
            "{:.0} {} {:.0} {}",
            hours,
            hour_string,
            minutes % MINUTES_PER_HOUR,
            min_string
        )
    } else {
        format!("{:.0} {}", minutes, min_string)
    }
}
/// Returns a nicely formatted string describing the `slot_span` in terms of weeks, days, hours
/// and/or minutes.
Returns a nicely formatted string describing the `slot_span` in terms of weeks, days, hours
and/or minutes.
Returns a nicely formatted string describing the ` slot_span ` in terms of weeks days hours and / or minutes .
fn seconds_pretty(secs: f64) -> String {
    if secs <= 0.0 {
        return "--".into();
    }
    let d = time::Duration::seconds_f64(secs);
    let weeks = d.whole_weeks();
    let days = d.whole_days();
    let hours = d.whole_hours();
    let minutes = d.whole_minutes();
    let week_string = if weeks == 1 { "week" } else { "weeks" };
    let day_string = if days == 1 { "day" } else { "days" };
    let hour_string = if hours == 1 { "hr" } else { "hrs" };
    let min_string = if minutes == 1 { "min" } else { "mins" };
    if weeks > 0 {
        format!(
            "{:.0} {} {:.0} {}",
            weeks,
            week_string,
            days % DAYS_PER_WEEK,
            day_string
        )
    } else if days > 0 {
        format!(
            "{:.0} {} {:.0} {}",
            days,
            day_string,
            hours % HOURS_PER_DAY,
            hour_string
        )
    } else if hours > 0 {
        format!(
            "{:.0} {} {:.0} {}",
            hours,
            hour_string,
            minutes % MINUTES_PER_HOUR,
            min_string
        )
    } else {
        format!("{:.0} {}", minutes, min_string)
    }
}
fn seconds_pretty ( secs : f64 ) -> String { if secs <= 0.0 { return " " . into ( ) ; } let d = time :: Duration :: seconds_f64 ( secs ) ; let weeks = d . whole_weeks ( ) ; let days = d . whole_days ( ) ; let hours = d . whole_hours ( ) ; let minutes = d . whole_minutes ( ) ; let week_string = if weeks == 1 { " " } else { " " } ; let day_string = if days == 1 { " " } else { " " } ; let hour_string = if hours == 1 { " " } else { " " } ; let min_string = if minutes == 1 { " " } else { " " } ; if weeks > 0 { format ! ( " " weeks week_string days DAYS_PER_WEEK day_string ) } else if days > 0 { format ! ( " " days day_string hours HOURS_PER_DAY hour_string ) } else if hours > 0 { format ! ( " " hours hour_string minutes MINUTES_PER_HOUR min_string ) } else { format ! ( " " minutes min_string ) } }
Returns a nicely formatted string describing the `slot_span` in terms of weeks, days, hours
and/or minutes.
Returns a nicely formatted string describing the ` slot_span ` in terms of weeks days hours and / or minutes .
secs
f64