Java Date to Minute getMinutesOfHour(Date dt)

Here you can find the source of getMinutesOfHour(Date dt)

Description

Get and return the minutes of the hour from the given Date dt

License

Open Source License

Parameter

Parameter Description
dt The given Date

Return

day The int value for minutes of hour

Declaration

public static int getMinutesOfHour(Date dt) 

Method Source Code

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

import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;

public class Main {
    /**// w ww  . j  a va 2 s  .c  o  m
     * Get and return the minutes of the hour from the given Date dt
     * 
     * @param dt
     *            The given Date
     * 
     * @return day The int value for minutes of hour
     */
    public static int getMinutesOfHour(Date dt) {
        Calendar cal = new GregorianCalendar();
        cal.setTime(dt);
        return (cal.get(Calendar.MINUTE));
    }
}

Related

  1. getMinuteOfHour(final Date date)
  2. getMinutes(Date d)
  3. getMinutes(Date time)
  4. getMinutes(final Date date)
  5. getMinutesInDay(Date d)
  6. minute(Date date)
  7. minute(final Date date)
  8. minuteAdd(Date date, int val)
  9. minuteDate(Date date, int num)