Java Time Readable Format toHumanable(long time_millsecod)

Here you can find the source of toHumanable(long time_millsecod)

Description

to Humanable

License

Open Source License

Declaration

public static String toHumanable(long time_millsecod) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static String toHumanable(long time_millsecod) {
        long second = time_millsecod / 1000;
        if (second < 60) {
            return second + "s";
        } else if (second < 60 * 60) {
            return second / (60) + "min";
        } else if (second < 60 * 60 * 24) {
            return second / (60 * 60) + "hour";
        } else {/*from  w ww .j  a va 2 s.co  m*/
            return second / (60 * 60 * 24) + "day";
        }
    }
}

Related

  1. getMaxTimeByStringDate(String date)
  2. humanTime(long ms)
  3. humanTime(long seconds)
  4. humanTime(long start, long end)
  5. toTime(int duration)
  6. toTime(long ms)
  7. toTime(long nanos)
  8. toTime(long time)