Java Minute Get getMinutesInSecWOHours(long sec)

Here you can find the source of getMinutesInSecWOHours(long sec)

Description

get Minutes In Sec WO Hours

License

Open Source License

Parameter

Parameter Description
sec les secondes a calculer.

Return

le nombre de minutes que contient sec sans les heures.

Declaration

public static float getMinutesInSecWOHours(long sec) 

Method Source Code

//package com.java2s;
/*//from  w  w  w.j a v  a2s.c  o m
 * This file is part of Java Tools for hdsdi3g'.
 * 
 * This library is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 * 
 * Copyright (C) hdsdi3g for hd3g.tv 2009-2012
 * 
*/

public class Main {
    /**
     * @param sec les secondes a calculer.
     * @return le nombre de minutes que contient sec sans les heures.
     * @see getHoursInSec.
     */
    public static float getMinutesInSecWOHours(long sec) {
        float _diff_hours = (float) sec / 3600f; // en heures,minutes
        int diff_hours = (int) Math.floor(_diff_hours); // en heures
        return ((float) _diff_hours - (float) diff_hours) * 60f;
    }
}

Related

  1. getMinutes(long time)
  2. getMinutes(String hora)
  3. getMinutes(String time)
  4. getMinutes(String time, int defaultValue)
  5. getMinutesDiff(long from, long to)
  6. getMinutesOfTowDiffDate(String p_startDate, String p_endDate)
  7. getMinutesRapp(long microseconds)
  8. getMinutesSeconds(long millisec, String fmt)
  9. getMinutesSinceEpoch()