Java Time to String timeToString(double d)

Here you can find the source of timeToString(double d)

Description

time To String

License

Open Source License

Declaration

public static String timeToString(double d) 

Method Source Code

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

public class Main {
    /** A constant indicating that there is no valid data. */
    public static final double NO_DATA_D = Double.NEGATIVE_INFINITY;

    public static String timeToString(double d) {
        if (d == NO_DATA_D) {
            return "No Data";

        } else {//from   w w w .ja  v a 2s. c o  m
            int minutes = ((int) d) / 60;
            int seconds = ((int) d) - (minutes * 60);
            return String.valueOf(minutes) + ":" + String.valueOf(seconds);
            //return FORMAT.format(d);
        }
    }
}

Related

  1. timeToStr(int time)
  2. timeToStr(String time)
  3. timeToString(Calendar date)
  4. timeToString(Date d, String tzString)
  5. timeToString(Date date)
  6. timeToString(double time, boolean longNames)
  7. timeToString(final Date date)
  8. timeToString(final long time)
  9. timeToString(int s)