Java Calendar Minute setToTime(Calendar calendar, int hours, int minutes)

Here you can find the source of setToTime(Calendar calendar, int hours, int minutes)

Description

set To Time

License

Open Source License

Declaration

public static void setToTime(Calendar calendar, int hours, int minutes) 

Method Source Code

//package com.java2s;

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

public class Main {
    public static void setToTime(Calendar calendar, int hours, int minutes) {
        calendar.set(Calendar.HOUR_OF_DAY, hours);
        calendar.set(Calendar.MINUTE, minutes);
    }/*  ww w.j  av a 2  s .  c o m*/

    public static Date setToTime(Date date, int hours, int minutes) {
        Calendar calendar = Calendar.getInstance();
        return calendar.getTime();
    }
}

Related

  1. roundByMinutes(Calendar cal, int interval)
  2. setCalendarHourMinSec(final Calendar originalCalendar, final int hourOfDay, final int minute, final int second)
  3. setCalendarTime(Calendar calendar, int hour, int minute, int second, int millis)
  4. setMinutes(int i, Calendar calendar)
  5. setTime(Calendar calendar, int hourOfDay, int minute, int second, int millisecond)