Java Time to String timeString(long tickNo, long offset)

Here you can find the source of timeString(long tickNo, long offset)

Description

time String

License

Open Source License

Declaration

public static String timeString(long tickNo, long offset) 

Method Source Code


//package com.java2s;
import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
import java.util.Locale;

public class Main {
    public static DecimalFormat timeFormat = new DecimalFormat("###.000", new DecimalFormatSymbols(Locale.US));

    public static String timeString(long tickNo, long offset) {
        return timeFormat.format(time(tickNo, offset));
    }/*from w w  w. j a va  2 s  . c  om*/

    public static float time(long tickNo, long offset) {
        return (float) (tickNo - offset) / (float) 600.0;
    }
}

Related

  1. time2String(long time)
  2. timesAreEqual(Date date1, Date date2)
  3. timeStr(Date _Date)
  4. timeString()
  5. timeString(double time)
  6. timeString2Date(String time)
  7. timeToDeparture(String startTime)
  8. timeToFullString(long time)
  9. timeToFullString(long time, boolean longNames)