Java Number Min Value min2sex(Integer minutes)

Here you can find the source of min2sex(Integer minutes)

Description

minsex

License

Open Source License

Declaration

public static String min2sex(Integer minutes) 

Method Source Code

//package com.java2s;
// it under the terms of the GNU General Public License as published by

public class Main {
    public static String min2sex(Integer minutes) {
        Integer hrs = minutes / 60;
        Integer mns = minutes % 60;
        // Geez! this is awful, is there not a better way?  Assembly code?
        StringBuilder buf = new StringBuilder();
        if (hrs < 10) {
            buf.append("0");
        }//from  ww w .  j  av  a 2 s  .c  o  m
        buf.append(hrs.toString());
        buf.append(":");
        if (mns < 10) {
            buf.append("0");
        }
        buf.append(mns.toString());
        return buf.toString();
    }
}

Related

  1. min(T v1, T v2)
  2. min(T v1, T v2, int nullSupport)
  3. min2(double a, double b)
  4. min2(int a, int b)
  5. min2msec(int min)
  6. min3(double a, double b, double c)
  7. min3(final int x, final int y, final int z)
  8. min3(int a, int b, int c)
  9. min3(int x, int y, int z)