Java Minute Get getMinutes(double t)

Here you can find the source of getMinutes(double t)

Description

Returns full number of minutes for given double time value.

License

Open Source License

Parameter

Parameter Description
t time value in hours.

Return

int value of minutes.

Declaration

public static int getMinutes(double t) 

Method Source Code

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

public class Main {
    /**// w  ww  . ja v  a2  s .com
     * Returns full number of minutes for given <code>double</code> time value.
     * @param t time value in hours.
     * @return <code>int</code> value of minutes. 
     */
    public static int getMinutes(double t) {
        double tt = (t - getHours(t)) * 60;
        return (int) Math.floor(tt);
    }

    /**
     * Returns full number of hours for given <code>double</code> time value.
     * @param t time value in hours.
     * @return <code>int</code> value of hours. 
     */
    public static int getHours(double t) {
        return (int) Math.floor(t);
    }
}

Related

  1. getMinuteOfHour(String dateKey)
  2. getMinutePeriod(int time, int period)
  3. getMinutes()
  4. getMinutes(Date date)
  5. getMinutes(double seconds)
  6. getMinutes(final double DEC_DEG)
  7. getMinutes(int minutes)
  8. getMinutes(long time)
  9. getMinutes(String hora)