Java Utililty Methods Minute Get

List of utility methods to do Minute Get

Description

The list of methods to do Minute Get are organized into topic(s).

Method

longgetMilliSecondFromMinute(int minute)
get Milli Second From Minute
return minute * 60 * 1000;
DategetMin()
get Min
return toDate(_DATE_MIN);
intgetMin(String dateTime)
get Min
Date date = null;
try {
    date = new SimpleDateFormat("yyyy-MM-dd HH:mm").parse(dateTime);
} catch (ParseException e) {
    e.printStackTrace();
Calendar now = Calendar.getInstance();
now.setTime(date);
...
StringgetMinDateString(Date date)
get Min Date String
DateFormat dateFormat = new SimpleDateFormat(minFormat);
return formatDateString(date, dateFormat);
StringgetMineType(String urlFile)
get Mine Type
URL url;
try {
    url = new URL(urlFile);
    HttpURLConnection connection = (HttpURLConnection) url.openConnection();
    return countFileSize(connection.getContentLength());
} catch (Exception e) {
    return "0";
StringgetMininte(Date time)
mm
return sd1.format(time);
DategetMiniTime()
get Mini Time
try {
    return stringToTime("yyyy-MM-dd HH:mm:ss", "1900-01-01 00:00:00");
} catch (Exception ex) {
    return new Date(0);
doublegetMinute()
get Minute
return format(getSecond() / 60.0);
StringgetMinute()
get Minute
Date currentTime = new Date();
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String dateString = formatter.format(currentTime);
String min;
min = dateString.substring(14, 16);
return min;
StringgetMinute()
get Minute
Calendar calendar = Calendar.getInstance();
String mi = "0" + calendar.get(Calendar.MINUTE);
mi = mi.substring(mi.length() - 2, mi.length());
return mi;