Java Long Number Format format(long offsetMillis)

Here you can find the source of format(long offsetMillis)

Description

quick & dirty format

License

Open Source License

Declaration

private static String format(long offsetMillis) 

Method Source Code

//package com.java2s;

public class Main {
    /**/* www.  ja  va  2s . c om*/
     * quick & dirty format
     */
    private static String format(long offsetMillis) {
        offsetMillis /= 60 * 1000;
        String sign = "+";
        if (offsetMillis < 0) {
            offsetMillis = -offsetMillis;
            sign = "-";
        }
        return sign + String.valueOf(offsetMillis / 60) + ":"
                + String.valueOf(100 + (offsetMillis % 60)).substring(1, 3);
    }
}

Related

  1. format(long bytes)
  2. format(long mem)
  3. format(long milliseconds)
  4. format(long ms)
  5. format(long numero, int numeroZeri)
  6. format(long s)
  7. format(long seconds)
  8. format(Long value)
  9. format(long value)